https://github.com/jmoussa/analytics-be
API that fetches and caches data from various sources. The api is meant to be paired with a front-end visualization framework to view and explore the data further.
https://github.com/jmoussa/analytics-be
fastapi fastapi-redis redis
Last synced: 25 days ago
JSON representation
API that fetches and caches data from various sources. The api is meant to be paired with a front-end visualization framework to view and explore the data further.
- Host: GitHub
- URL: https://github.com/jmoussa/analytics-be
- Owner: jmoussa
- License: bsd-2-clause
- Created: 2022-03-18T01:57:42.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-18T12:28:57.000Z (about 4 years ago)
- Last Synced: 2025-01-20T14:34:52.747Z (over 1 year ago)
- Topics: fastapi, fastapi-redis, redis
- Language: Python
- Homepage:
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Analytics Backend Server
A quick backend for a basic analytics work.
This will serve as a catch-all for various data lookups and the main interface to display the [visualization platform](https://github.com/jmoussa/analytics-fe)
# This project was made using FastAPI-redis template
# User Guide
Fastapi framework template, with basic redis operations.



## Development
### Prerequisitive
| Name | Version |
| --------------------- | ---------------- |
| Python | 3.8 |
| pipenv(Python module) | 2018.11.26 or up |
### Environment setup
0. Initialize environment variable
```
cp sample.env .env
```
1. Initialize Python environment
```
make init
```
2. Enter the environment and start developing
```
pipenv shell
```
3. Start development API service
```
cd api/
uvicorn app:APP
```
The server will run at http://127.0.0.1:8000
### Formatting
This project uses `black` and `isort` for formatting
```
make format
```
### Linting
This project uses `pylint` and `flake8` for linting
```
make lint
```
### Testing
This project uses `pytest` and its extension(`pytest-cov`) for testing
## Deployment
### Prerequisitive
| Name | Version |
| -------------- | ------- |
| Docker | 19.03.6 |
| docker-compose | 1.17.1 |
### Building image
```
docker-compose build
```
This will build the image with tag `fastapi-template:latest`
### Deployment step
The service is deployed with `docker-compose`.
0. Start containers
```
docker-compose up
```
## Contribution
- Darkborderman/Divik(reastw1234@gmail.com)