https://github.com/eduardogr/djangorf-base
Django project built with the aim of avoiding boilerplate and being used as the base of other projects to build REST APIs using django-rest-framework.
https://github.com/eduardogr/djangorf-base
boilerplate-application django django-rest-framewok docker-compose monitoring python3 rest-api
Last synced: 4 months ago
JSON representation
Django project built with the aim of avoiding boilerplate and being used as the base of other projects to build REST APIs using django-rest-framework.
- Host: GitHub
- URL: https://github.com/eduardogr/djangorf-base
- Owner: eduardogr
- License: apache-2.0
- Created: 2020-05-16T21:14:09.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-06-26T18:03:16.000Z (12 months ago)
- Last Synced: 2025-01-14T14:56:23.741Z (5 months ago)
- Topics: boilerplate-application, django, django-rest-framewok, docker-compose, monitoring, python3, rest-api
- Language: Python
- Homepage:
- Size: 129 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
djangorf-base
[]()
[](https://github.com/eduardogr/evalytics/blob/master/.github/CONTRIBUTING.md)
[](https://github.com/eduardogr/djangorf-base/blob/master/LICENSE)# Introduction
**djangorf-base** is a Django project built with the aim of **avoiding boilerplate** and being used as the **base** of other projects to build **REST APIs** using django-rest-framework.
![]()
Diagram drawn using [diagrams](https://github.com/mingrammer/diagrams).
## Table of Contents
0. [Introduction](#introduction)
0. [Development](#development)
0. [Contributing](#family-contributing)
0. [License](#page_with_curl-license)# Development
This projects is built using `docker`, `docker-compose` and `make` within the development environment.
`make build && make up` will up and run the django rest server.
## API Requests
```
curl -H 'Accept: application/json; indent=4' -u user:passwd http://127.0.0.1:8000/users/
```# Prometheus
## Some available metrics
- django_http_requests_body_total_bytes_bucket
- django_http_responses_body_total_bytes_bucket
- django_http_requests_latency_seconds_by_view_method_bucket
- django_http_requests_latency_including_middlewares_seconds_bucket- prometheus_http_requests_total
- prometheus_http_request_duration_seconds_bucket
- prometheus_http_response_size_bytes_bucket## PromQL queries examples
- sum(rate(django_http_requests_latency_seconds_by_view_method_bucket[30s])) BY (job, method)
- sum(rate(django_http_responses_body_total_bytes_bucket[30s])) by (job)# Contributing
# License
This project is licensed under the [Apache license](https://github.com/eduardogr/evalytics/blob/main/LICENSE).