Skip to main content

Use json files with the import statement

Project description

https://travis-ci.org/kragniz/json-sempai.png?branch=master https://pypip.in/d/json-sempai/badge.png

Have you ever been kept awake at night, desperately feeling a burning desire to do nothing else but directly import json files in python [1]? Now you can!

Usage

Slap a json file somewhere on your python path. tester.json:

{
    "hello": "world",
    "this": {
        "can": {
            "be": "nested"
        }
    }
}

Now import jsonsempai and your json file!

>>> import jsonsempai
>>> import tester
>>> tester
<module 'tester' from 'tester.json'>
>>> tester.hello
u'world'
>>> tester.this.can.be
u'nested'
>>>

Installing

Install from pip:

$ pip install json-sempai

or clone this repo and install from source:

$ python setup.py install

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

json-sempai-0.1.0.tar.gz (2.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page