Data files included as part of SNOwGLoBES
Project description
snowglobes_data
Module to make SNOwGLoBES data files available as a PyPI package.
This lets any Python package install SNOwGLoBES data files as a dependency via pip
and access them via the importlib.resources
module.
Usage
Install this package manually using
pip install snowglobes_data
or automatically by listing it as a dependency e.g. in the requirements.txt
file of another Python package.
You can then access the data files without cloning the SNOwGLoBES repo and manually hard-coding its path in the script:
from importlib.resources import files
import snowglobes_data
# Use `files(snowglobes_data)` instead of the hard-coded path to the SNOwGLoBES repo:
with open(files(snowglobes_data).joinpath("detector_configurations.dat")) as detectors:
for line in detectors:
print(line.strip())
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
snowglobes_data-1.3.1.tar.gz
(28.5 MB
view hashes)
Built Distribution
Close
Hashes for snowglobes_data-1.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f54dcdbc9e97b905ac0559bbfad720522f7784d282918fbd6c1085aee6fa06cc |
|
MD5 | 2105c4c2c6e508f74f2c06aa744a11a3 |
|
BLAKE2b-256 | c67bde94886483eb97cf8a9b788f03232f81c3cba645b372c1200978d43e400c |