Metadata-Version: 2.1
Name: crazyimports
Version: 0.0.2
Summary: Treat your data as your code
Home-page: https://github.com/mishankov/crazy-imports
Author: Denis Mishankov
Author-email: mishankov@mail.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown

# Crazy Imports - treat your data as your code

[![Code style: black](https://img.shields.io/badge/code%20style-black-black)](https://github.com/mishankov/crazy-imports/actions?query=workflow%3Ablack)
![CI](https://github.com/mishankov/crazy-imports/workflows/CI/badge.svg)
[![CircleCI](https://img.shields.io/circleci/build/github/mishankov/crazy-imports)](https://app.circleci.com/pipelines/github/mishankov/crazy-imports)
[![PyPI](https://img.shields.io/pypi/v/crazyimports)](https://pypi.org/project/crazyimports/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/crazyimports)
![PyPI - Implementation](https://img.shields.io/pypi/implementation/crazyimports)
[![PyPI - License](https://img.shields.io/pypi/l/crazyimports)](https://github.com/mishankov/crazy-imports/blob/main/LICENSE)

`crazyimports` module allows you to use your data files as if it was python modules

## Installation

`pip install crazyimports`

## Simple example

Create `example.json` file with this content

```json
{"number": 42}
```

 Than in the same directory create `test.py` file

```python
import crazyimports.json
import example

print(example.number)
```

Then when you run `python test.py` you would see `42` output in your command line

This and other examples you can find in `examples/` folder

## Supported file extensions

- `.json` for JSON files
- `.sqlite3` for SQLite3 database files
- `.csv` for CSV (Comma Separated Values) files

## Inspiration

Heavily inspired by [this talk](https://youtu.be/CWZVNgStgbI) by [@bobuk](https://github.com/bobuk)


