Django API Playground
A django app that creates api explorer for RESTful APIs.
Works with any RESTful API. For example, you can create api explorer for your tastypie based API with this app.
Demo: http://api-playground-demo.hipo.biz
Instructions
To get this application up and running, please follow the steps below:
Install from pip:
pip install django-api-playground
Or from source:
pip install git+git://github.com/Hipo/Django-API-Playground.git
Add to installed apps:
INSTALLED_APPS =(
# ...
'apiplayground',
)
Installation is completed. You can define the API schema now.
Firs step, Create an url:
# urls.py
from api.playgrounds import ExampleAPIPlayground
urlpatterns = patterns('',
(r'api-explorer/', include(ExampleAPIPlayground().urls)),
)
Second step, Define a subclass for your API:
# api/playgrounds.py
from apiplayground import APIPlayground
class ExampleAPIPlayground(APIPlayground):
schema = {
"title": "API Playground",
"base_url": "http://localhost/api/",
"resources": [
{
"name": "/feedbacks",
"description": "This resource allows you to manage feedbacks.",
"endpoints": [
{
"method": "GET",
"url": "/api/feedbacks/{feedback-id}",
"description": "Returns a specific feedback item"
},
{
"method": "POST",
"url": "/api/feedbacks/",
"description": "Creates new feedback item",
"parameters": [{
"name": "title",
"type": "string"
},
{
"name": "resource",
"type": "string"
},
{
"name": "description",
"type": "string"
}]
}
]
},
]
}
That’s all. More detailed documentation will be coming soon.
Metadata
Release files for django-api-playground 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-api-playground-0.1.0.tar.gz | 45.3 kB | Without provenance | Details for django-api-playground-0.1.0.tar.gz |
Release files / django-api-playground-0.1.0.tar.gz
| Download URL | django-api-playground-0.1.0.tar.gz |
|---|---|
| Size | 45.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b874e4825f178f002b518bdc91244bd5dcc4cae8d1b58d9a113174409cdb1ef9
|
|
BLAKE2b-256 checksum How to use checksums |
72b673dcc71c2b21328879c8f233dd7845d32da76ed90692be198297cd9bfc4b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-api-playground 0.1.0
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.