Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ozanturksever/fixtureload
simple fixture loader
https://github.com/ozanturksever/fixtureload
Last synced: about 2 months ago
JSON representation
simple fixture loader
- Host: GitHub
- URL: https://github.com/ozanturksever/fixtureload
- Owner: ozanturksever
- Created: 2013-08-20T07:58:15.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-08-20T16:39:58.000Z (over 11 years ago)
- Last Synced: 2024-10-01T17:20:10.222Z (3 months ago)
- Language: Python
- Size: 117 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Simple Fixture Loader
=====================Source Directory:
```
_ fixtures
\_ restapi.json
```Fixture JSON Structure:
```json
{
"users": {
"samples": {
"a user": {"username": "ozan", "password": "test"},
"user list": [{"username": "ozan", "password": "gizli0"}, {"username": "okan", "password": "gizli2"}]
}
}
}
```Example:
```python
import fixtureload
fixtureload.set_source_dir('/fixtures') # defaults to .user_list = fixtureload.load('restapi/users/user list')
# user_list = [{'username': 'ozan', 'password': 'gizli0'}, {'username': 'okan', 'password': 'gizli2'}]a_user = fixtureload.load('restapi/users/a user')
# a_user = {'username': 'ozan', 'password': 'gizli0'}```