Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- So to be sure I understand how this works correctly:
- Given a repository that looks like
- ```
- /pyproject.toml
- /config/default.json
- /assets/random.csv
- /assets/data/emptyFolderForTempStorageAndProcessing/.gitkeep
- /project/ModuleName.py
- ```
- and my pyproject.toml has (among other things)
- ```
- [tool.poetry]
- ...
- include = ["assets/**/*", "config/*.json"]
- [tool.poetry.scripts]
- module-name = "project.ModuleName:main"
- ```
- if I wanted to access `/config/default.json` from within `/project/ModuleName.py`, I would call `importlib.resources.open_test('config', 'default.json')`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement