Skip to content

KentoImayoshi/PrjAPIDjango

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PrjAPIDjango — Aluraflix API (Django + DRF)

A REST API built with Django 3 and Django REST Framework for a video catalog (Aluraflix). This repository focuses on automated tests and API documentation (Swagger / OpenAPI).

What’s inside

  • CRUD-style REST endpoints with Django REST Framework
  • Automated test suite (Django test runner)
  • Swagger/OpenAPI documentation (Swagger UI / ReDoc)
  • SQLite by default (can be configured in setup/settings.py)

Tech stack

  • Python 3.x
  • Django 3.x
  • Django REST Framework
  • Swagger/OpenAPI docs tooling
  • SQLite (default)

Run locally

1) Clone

git clone https://github.com/KentoImayoshi/PrjAPIDjango.git cd PrjAPIDjango

2) Create & activate a virtual environment

Linux/macOS

python -m venv .venv source .venv/bin/activate

Windows (PowerShell)

python -m venv .venv ..venv\Scripts\Activate.ps1

3) Install dependencies

pip install -r requirements.txt

4) Migrate and run

python manage.py migrate python manage.py runserver

Server:

http://localhost:8000/

(Optional) Admin:

python manage.py createsuperuser http://localhost:8000/admin/

API documentation

After starting the server, try:

http://localhost:8000/swagger/

http://localhost:8000/redoc/

http://localhost:8000/api/docs/

If none of them work, check setup/urls.py for the configured docs route.

Tests

python manage.py test

Project structure

PrjAPIDjango/
├── README.md
├── .gitignore
├── requirements.txt
├── manage.py
├── setup/
│   ├── settings.py
│   ├── urls.py
│   ├── wsgi.py
│   └── asgi.py
└── aluraflix/
   ├── models.py
   ├── serializers.py
   ├── views.py
   ├── urls.py
   ├── tests/
   │   ├── test_models.py
   │   ├── test_serializers.py
   │   └── test_views.py
   └── migrations/
      └── __init__.py

Credits

Originally built while following the Alura course “API com Django 3: Aprofundando em testes e documentação” and maintained as a portfolio project.

About

Django 3 + DRF REST API (Aluraflix) showcasing automated tests and Swagger/OpenAPI documentation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages