Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: about 1 month 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.

Awesome Lists containing this project

README

        

djangorf-base


[![Python](https://img.shields.io/badge/Python-v3.6%2B-blue)]()
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/eduardogr/evalytics/blob/master/.github/CONTRIBUTING.md)
[![GitHub license](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](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.


drawing

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).