Treat your data as your code
Project description
Crazy Imports - treat your data as your code
crazyimports
module allows you to use your data files as if it was python modules
Simple example
Install crazyimports
module
pip install -U crazyimports
Create example.json
file with this content
{"number": 42}
Than in the same directory create test.py
file
import crazyimports
import example
print(example.number)
Then when you run python test.py
you would see 42
output in your command line
You can find more examles in exaples section of documentation
Supported file extensions
.json
for JSON files.sqlite3
and.sqlite
for SQLite3 database files.csv
for CSV (Comma Separated Values) files.yaml
and.yml
for YAML files
Credits
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
crazyimports-0.0.6.tar.gz
(4.7 kB
view hashes)
Built Distribution
Close
Hashes for crazyimports-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54eb29a96121d2ed3a0520f5270ed931e1d60b85f1d869f66d8b49dd1cc40aaf |
|
MD5 | 202d94401ff4cbcec2a119e66e16497e |
|
BLAKE2b-256 | 10113a394e207fbed9fbc6cb7832043bc23626142d7b8d576ab979fa13ed2ec7 |