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 examples in examples 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.pickle
for pickle files.toml
for toml 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.2.1.tar.gz
(4.7 kB
view details)
Built Distribution
File details
Details for the file crazyimports-0.2.1.tar.gz
.
File metadata
- Download URL: crazyimports-0.2.1.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30e59cfae9bbd324c84291a3e1a60f11bcc6e12e8cef6b3adfda24e9a39f97b6 |
|
MD5 | fda80b074608e3051337b6921c2e99a5 |
|
BLAKE2b-256 | 7228b3e7c8e55c4c5667b1f66c57eb34f099d8a72a672985512d7d04464684ba |
File details
Details for the file crazyimports-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: crazyimports-0.2.1-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01e3ae751a5edea6b05ccb7e9130c4b5155c6ce25e4a0a9d1beb78088d9b8d4d |
|
MD5 | d630ebdd5a877d4e5d1f5043effe4841 |
|
BLAKE2b-256 | 22bbb1413b2e35297577a438067966671d66a4a9d3b32b617a520a6cfcc10da2 |