https://github.com/mevdschee/py-crud-api
A Python port of the full php-crud-api project (single file REST API)
https://github.com/mevdschee/py-crud-api
Last synced: 8 months ago
JSON representation
A Python port of the full php-crud-api project (single file REST API)
- Host: GitHub
- URL: https://github.com/mevdschee/py-crud-api
- Owner: mevdschee
- Created: 2017-11-19T01:44:09.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-02T07:36:11.000Z (about 8 years ago)
- Last Synced: 2025-04-26T15:02:39.801Z (9 months ago)
- Language: Python
- Size: 19.5 KB
- Stars: 11
- Watchers: 2
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# py-crud-api
A Python port of the full php-crud-api project (single file REST API)
NB: WORK IN PROGRESS - NOT FINISHED YET!
### Installing / Running
You need to execute the following to install dependencies on Ubuntu 16.04:
sudo apt-get install python pip libev-dev libprotobuf-dev protobuf-compiler
export MYSQLXPB_PROTOC=/usr/bin/protoc
export MYSQLXPB_PROTOBUF_INCLUDE_DIR=/usr/include/google/protobuf
export MYSQLXPB_PROTOBUF_LIB_DIR=/usr/lib/x86_64-linux-gnu
pip install bjoern mysql-connector gunicorn meinheld
To run single core (using Bjoern):
python api.py
To run multi core (using Gunicorn and Meinheld):
gunicorn --workers=4 --worker-class="egg:meinheld#gunicorn_worker" api:app
NB: workers should match core count.
### Performance improvements
Do you have an idea for a performance improvement? Open an [issue](https://github.com/mevdschee/py-crud-api/issues) or a [pull request](https://github.com/mevdschee/py-crud-api/pulls).