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/nipraxis_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)
fetch_file = _fetcher.fetch_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 fetch_file
fname = fetch_file('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.1a1.tar.gz
(5.1 kB
view hashes)
Built Distribution
Close
Hashes for unscrewed-0.1a1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 510e66ddddc2a9b95ad7399f7b4b1fa6c218541818bde6eb1ae67b7ea611ded9 |
|
MD5 | 4fff39499ecc9d7dbd4b9e972060c81e |
|
BLAKE2b-256 | b0cc9f572ee5a8cfc99bb87648df4bd85022d3ed42b65566e090c44a5b3261cc |