https://github.com/zaghaghi/direct-json-import
import json files directly in your python scripts
https://github.com/zaghaghi/direct-json-import
import json python
Last synced: 10 months ago
JSON representation
import json files directly in your python scripts
- Host: GitHub
- URL: https://github.com/zaghaghi/direct-json-import
- Owner: zaghaghi
- License: apache-2.0
- Created: 2021-06-09T09:50:18.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-06-10T16:32:31.000Z (about 5 years ago)
- Last Synced: 2025-04-08T11:40:27.172Z (about 1 year ago)
- Topics: import, json, python
- Language: Python
- Homepage:
- Size: 10.7 MB
- Stars: 53
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Install
Install from git repository
```bash
pip install git+https://github.com/zaghaghi/direct-json-import.git
```
# Use
With the following json in a file named `info.json`.
```json
{
"name": "hamed",
"lastname": "zaghaghi",
"repos": [
"https://github.com/zaghaghi/direct-json-import"
]
}
```
you can directly import it as follows
```python
import info
print(info.data)
# {'name': 'hamed', 'lastname': 'zaghaghi', 'repos': ['https://github.com/zaghaghi/direct-json-import']}
```
