Unscrewed data packaging
Project description
Unscrewed
Utility for making and updating a data fetcher component of your project.
Install
pip install unscrewed
Usage
First prepare a registry.yaml
file, like the one in
unscrewed/tests/testreg_registry.yaml
. Put it in your package, say in the
your_package
directory (that contains the __init__.py
file). Maybe call
it registry.yaml
.
In some module, say your_package/data.py
import pkg_resources
import unscrewed
_config_file = pkg_resources.resource_filename("your_package", "registry.yaml")
fetcher = unscrewed.Fetcher(_config_file)
Say you have a file my_data_file.nii
configured in your registry.yaml
file above.
Now you can fetch it like this:
from your_package.data import fetcher
fname = fetcher('my_data_file.nii')
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
unscrewed-0.1a2.tar.gz
(83.9 kB
view hashes)
Built Distribution
Close
Hashes for unscrewed-0.1a2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a05f554013fefce1421c64ccf294ef6c0a847c4f007ccdd681aa787589c46a0 |
|
MD5 | f9128e8c5fa9243c48dc2141d2f080e4 |
|
BLAKE2b-256 | 0ef82dfbb97421887e53c0c4c5d65aada1422ab94d619e78cef2e1f71e7ff47f |