An example project demonstrating various ways to access data files in Python package
Project description
This project shows how to package data files within a Python distribution, and example code for reading the data files.
To build this distribution, create a venv with setuptools, wheel, and pep517 installed, then execute the latter as a module:
python -m pep517.build .
The distributions (an sdist .tar.gz and a bdist .whl) will be written to ./dist/ subdirectory.
To test it out, install a distribution and run the console script resources-example.
Accessing resources should work on both Python 2 and Python 3, Linux, macOS, Windows.. and all methods except for example1.py should still work when the package myapp has been
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file resources-example-0.1.tar.gz
.
File metadata
- Download URL: resources-example-0.1.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 471ccda14cd87d244e801588fa30dc3de421bb95cb43e5b30f095192956349c8 |
|
MD5 | 9286a76c495a691748dfc501951c0a97 |
|
BLAKE2b-256 | 381c4bea5a34ecae1609dfbacdaf083eb66241f03cd1b36038db0b24a01d9add |
Provenance
File details
Details for the file resources_example-0.1-py2.py3-none-any.whl
.
File metadata
- Download URL: resources_example-0.1-py2.py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0651867ee891bf6196b77f66d26e88bb618f338dd8a55bf7d69041a5d48858a |
|
MD5 | 163c6208a438460c53981c3188e2d88c |
|
BLAKE2b-256 | ea50fe925af0ad238a1c59dcb9d972340f79ce8c4ad6e6afb424fd63dab53a30 |