Welcome to aiohttp-admin!¶
aiohttp_admin will help you on building an admin interface on top of an existing data model. Library designed to be database agnostic and decoupled of any ORM or datbase layer. Admin module relies on async/await syntax (PEP492) thus not compatible with Python older then 3.5.
What is aiohttp-admin use cases?
- For small web applications or micro services, where custom admin interface is overkill.
- To give a manager something to play with while proper admin interface is not ready.
- Could be solution if you absolutely hate to write a lot of js/html but have to

Features¶
- designed to be used with aiohttp;
- library supports multiple database, out of the box MySQL, PostgreSQL, Mongodb;
- clear separation of backend and frontend layers;
- no WTForms, frontend is SPA;
- uvloop compatible, tests executed with both: default and uvloop
- database agnostic, if you can represent your entities with REST api, you can build admin views.
Documentation¶
Contributing¶
Running Tests¶
Thanks for your interest in contributing to aiohttp_admin
, there are multiple
ways and places you can contribute.
Fist of all just clone repository:
$ git clone git@github.com:aio-libs/aiohttp_admin.git
Install docker using instruction from the official site, for OSX we use docker-machine.
Create virtualenv with python3.5 (older version are not supported). For example using virtualenvwrapper commands could look like:
$ cd aiohttp_admin
$ mkvirtualenv --python=`which python3.5` aiohttp_admin
After that please install libraries required for development:
$ pip install -r requirements-dev.txt
Congratulations, you are ready to run the test suite:
$ py.test --dp -s -v ./tests
Under the hood python docker client pulls images for PostgreSQL, MySQL and Mongodb. Fixtures start databases and insert testing data. You do not have to install any database at all.
Next time –dp (docker pull) flag could be dropped since all required images are cached on local machine. To make sure you have required images please execute:
$ docker images
Among results you should find something like:
postgres 9.5 247a11721cbd 2 weeks ago 265.9 MB
mysql 5.7 63a92d0c131d 8 weeks ago 374.1 MB
mongo 2.6 150dd5b5bd1b 9 weeks ago 390.9 MB
For OSX users one extra step is required, before running tests, please init environment variables:
$ eval $(docker-machine env default)
$ export DOCKER_MACHINE_IP=$(docker-machine ip)
Reporting an Issue¶
If you have found issue with aiohttp-admin please do not hesitate to file an issue on the GitHub project. When filing your issue please make sure you can express the issue with a reproducible test case.
When reporting an issue we also need as much information about your environment that you can include. We never know what information will be pertinent when trying narrow down the issue. Please include at least the following information:
- Version of aiohttp-admin and python.
- Version of database.
- Platform you’re running on (OS X, Linux, Windows).
Design¶
aiohttp_admin using following design philosophy:
- backend and frontend of admin views are decoupled by REST API as result it is possible to change admin views without changing any python code. On browser side user interacts with single page application (ng-admin).
- admin views are database agnostic, if it is possible to implement REST API it should be strait forward to add admin views. Some filtering features may be disabled if database do not support some kind of filtering.
Requirements¶
- Python 3.5+
- PostgreSQL with, aiopg and sqlalchemy.core
- MySQL with aiomysql and sqlalchemy.core
- Mongodb with motor