This package handles file I/O for larger projects, with the aim to simplify/standardize working with many datasets and 3rd party codebases across different naming conventions, data types, and storage systems.
To run unit tests, run
$python -m unittest discover -s tests
$for dev, it is better to run pip install -e .
Project set up
System Identity File
Create a file named .system_identity.txt at the top level project directory. Decide on a name for your local system, and add it as a single line to the the file as:
In conf/system_configs/system_conf.yaml, input the following:
System config
Create a config file in conf/system_configs/system_conf.yaml. This holds information file_golem needs to navigate your file systems:
filelock_timeout: <number of seconds to wait for filelock (default: wait indefinitely)>
system_paths: : base_data_directory: <project directory (output of pwd())>
base_conda_name: <path to conda environment when calling conda env list>
external_calls:
<name of external codebase used in code>:
entry_point: <absolute path of top project directory>
conda_path: <path to external environment when calling conda env list>
python_entry_point: <Name of the python file (from top level project directory sans .py)>
(optional) data_directory_name: <name of subdirectory where untracked data is stored > (default: data)
system_transfers:
<non local mounted system name>:
mount_point: <absolute path of the mount point on your local system>
data_directory_extension: <path to the root of the data directory on the mounted system> (file_folem will look in mount_point/data_directory_extension)
base_data_directory can be customized to an alternative location if desired.
Building a file path
FilePathEntries.CUSTOM_LOGIC : '<my_static_function>'
Will call my_static_function(data_args)
which will include data_io and data_type
Dealing with h5py files
H5 files efficiently store data at scale. file_golem standardizes i/o for these files. First, create a class that inherits from H5PYAbstractDatatype:
from file_golem import H5PYAbstractDatatype
class <my h5py datatype>(H5PYAbstractDatatype):
RELATIVE_PATH_TUPLE = H5PYAbstractDatatype.RELATIVE_PATH_TUPLE + (
<path extension 1>, <path extension 2>, ...
)
FILE_STRUCTURE = {
<node name a>: {
H5PYAbstractDatatype.DATASET_DATATYPE: <file_golem datatype of <node name a> or H5PYAbstractDatatype.ATTRITBUTE>
}
<group name 0>: {
<node name a>: {
<file_golem datatype of <node name a> >
},
},
<group name 1>: {
<node name b>: {
<file_golem datatype of <node name b> >,
}
},
<group name 2>: {
<group name 3>: {
...
}
<node name c>: {
<file_golem datatype of <node name c> >
},
},
}
To perform i/o, one can call the typical file_golem calls,
data_io.load_data(, data_args={ .DATA: .DATASET_ADDRESS: [<group name 2>,<group name 3>,...] .DATASET_SIZE: .H5PY_IDX: ...
}
)
Metadata
Release files for file-golem 0.1.14
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| file_golem-0.1.14.tar.gz | 28.3 kB | Without provenance | Details for file_golem-0.1.14.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| file_golem-0.1.14-py3-none-any.whl | Python 3 | none | any | Details for file_golem-0.1.14-py3-none-any.whl |
Total release size: 61.1 kB
Release files / file_golem-0.1.14.tar.gz
| Download URL | file_golem-0.1.14.tar.gz |
|---|---|
| Size | 28.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fb5e61c84421afbb8d3a9a8759208930f98c25aafb42ee12a6006ca541c8051e
|
|
BLAKE2b-256 checksum How to use checksums |
a18016e83c03e85e046fdfbd0423162b4c44dfad7454cd23613ddd625c920643
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.14
|
Release files / file_golem-0.1.14-py3-none-any.whl
| Download URL | file_golem-0.1.14-py3-none-any.whl |
|---|---|
| Size | 32.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dce1506e6e03c7f2240fdefbb46c0ddd8a1091d91fa5e8676d283b750798f3ae
|
|
BLAKE2b-256 checksum How to use checksums |
d02ad743c7fd33342be03c7900613331c3c166ec38e64f0bf065e2949c721577
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.14
|
Security for file-golem 0.1.14
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.