https://github.com/msoedov/flask-graphql-example
Example GraphQL application with Flask, pypy/python3 and MongoDB
https://github.com/msoedov/flask-graphql-example
flask graphql mongodb python
Last synced: 6 months ago
JSON representation
Example GraphQL application with Flask, pypy/python3 and MongoDB
- Host: GitHub
- URL: https://github.com/msoedov/flask-graphql-example
- Owner: msoedov
- License: mit
- Created: 2015-11-27T20:43:21.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-09T03:49:10.000Z (over 8 years ago)
- Last Synced: 2024-12-29T23:25:05.319Z (6 months ago)
- Topics: flask, graphql, mongodb, python
- Language: Python
- Size: 343 KB
- Stars: 55
- Watchers: 3
- Forks: 7
- Open Issues: 3
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
Example of small GraphQL app with Flask + Python3/PyPy3 + MongoDb
[](https://travis-ci.org/msoedov/flask-graphql-example)
[](https://www.quantifiedcode.com/app/project/44eede68b96745bdafee5a8a208ea3c3)### Quick start with docker
```shell
docker-compose build
docker-compose up
```Optionally populate database
```shell
docker-compose run web pypy3 manage.py init
```And then open http://localhost:5000/ui

### Development workflow
Create a virtual environment with Python3 or PyPy3
Make sure you have running MongoDb instance either on localhost or
```shell
export DB_PORT_27017_TCP_ADDR='ip address'```
Likewise you can use containerized Mongo but you will need to setup env variables as well
```shell
docker-compose build
docker-compose up db
```Then you can install deps and run the python app
```
make req
python api.py
```#### Miscellaneous
Auto format your code
```shellmake format
```Nosetests with reload
```shell
make watch
```