https://github.com/yusufcanb/evening
Evening is an Eve boilerplate project for rapid api deployment via yaml file configurations.
https://github.com/yusufcanb/evening
eve eve-boilerplate flask prototype
Last synced: about 1 month ago
JSON representation
Evening is an Eve boilerplate project for rapid api deployment via yaml file configurations.
- Host: GitHub
- URL: https://github.com/yusufcanb/evening
- Owner: yusufcanb
- Created: 2020-01-29T14:34:06.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-28T00:08:44.000Z (over 4 years ago)
- Last Synced: 2025-04-03T12:52:53.691Z (6 months ago)
- Topics: eve, eve-boilerplate, flask, prototype
- Language: Python
- Homepage:
- Size: 31.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Evening

Evening is an Eve boilerplate project for rapid api deployment via `.yaml` file configurations.
## Getting Started
Install required python packages;
```shell
pipenv install
```Activate your Pipenv;
```
pipenv shell
```Run development server;
```
python manage.py runserver
```## Guide
### How to create resource?
First, create new `.yaml` called `book.yaml` in `resources/` directory;
```shell
touch resources/book.yaml
```Then edit file with the content below;
```yaml
url: book
sorting: true
resource_methods:
- GET
- POST
- DELETE
item_methods:
- GET
- PATCH
- DELETE
schema:
name:
type: string
categoryId:
type: objectid
required: true
type:
type: string
allowed:
- bestseller
- low-price
- high-price
age:
type: number
max: 10
```All set, now run development server with;
```shell
python manage.py runserver
```Navigate to the Swagger UI;
```
http://127.0.0.1:5000/docs
```You will see your book endpoints accordingly. You can check all configurations on `/docs/resource-config.rst` file.
## Deployment
### Docker
Build image with;
```shell
docker build -t evening-api .
```Run container with port binding;
```shell
docker run -p 8000:8000 evening-api
```### Docker Compose
Evening preconfigured with MongoDB instance specified in `docker-compose.yml` file.
Simply run;
```shell
docker-compose up
```