Skip to main content

Crazy Imports - treat your data as your code

CI/CD Code style: black CodeFactor codecov PyPI Downloads PyPI - Python Version PyPI - Implementation PyPI - License

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

Heavily inspired by this talk by @bobuk

Metadata

Release files for crazyimports 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for crazyimports 0.2.1
File Size Uploaded Provenance Actions
crazyimports-0.2.1.tar.gz 4.7 kB Without provenance Details for crazyimports-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for crazyimports 0.2.1
File Interpreter ABI Platform Actions
crazyimports-0.2.1-py3-none-any.whl Python 3 none any Details for crazyimports-0.2.1-py3-none-any.whl

Total release size: 11.2 kB

Release files / crazyimports-0.2.1.tar.gz

Download URL crazyimports-0.2.1.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
30e59cfae9bbd324c84291a3e1a60f11bcc6e12e8cef6b3adfda24e9a39f97b6
BLAKE2b-256 checksum
How to use checksums
7228b3e7c8e55c4c5667b1f66c57eb34f099d8a72a672985512d7d04464684ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.9

Release files / crazyimports-0.2.1-py3-none-any.whl

Download URL crazyimports-0.2.1-py3-none-any.whl
Size 6.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
01e3ae751a5edea6b05ccb7e9130c4b5155c6ce25e4a0a9d1beb78088d9b8d4d
BLAKE2b-256 checksum
How to use checksums
22bbb1413b2e35297577a438067966671d66a4a9d3b32b617a520a6cfcc10da2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.9

Security for crazyimports 0.2.1

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page