Skip to content

senciucserban/nkoe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nkoe

Nkoe means tiger in Sesotho 🐯

Python 3.7.x Flake8 Poetry

A basic aiohttp server which implement few endpoints. This project was made with educational purpose so those are some basic things.

About

Here it's a documentation made in postman.

As exercise you must add request with documentation for endpoint Add vaccine to a cat. You can choose any cat you want.

Installation

First you need some tools:
  1. A dependency manager: Poetry.
  2. For tests you will need Postman to perform requests.
Installation:
  1. Clone project locally;
  2. Install dependencies with poetry install;
  3. Take a look at .example.env to see if you must configure something;
  4. Now run server with the following command: poetry run server;

Postman Setup

I assume you already have installed and setup postman locally; Note I recommend to create a new workspace to avoid overwriting existing things!

For collection: Open postman and from left upper corner select import and then Import from link and put this link: https://www.getpostman.com/collections/33c1efb9969544146bf9.

For environment: In this repository you will find a folder named docs. Open postman select from left upper corner import and then Import folder and just drag and drop that folder.

For globals: From right upper corner click on that eye, go with mouse on globals row and press edit, in that table add a new row with: Variable = username, Initial value = [your name], Current Value = [leave it blank], and press save.

For local environment I suppose you will run your server on port 8080 and for qa on port 8081.

Endpoints

ENDPOINT METHOD DESCRIPTION
Base
.../ GET overview 📓
Auth
.../login/ POST Create token ➕
.../logout/ POST Delete token ➖
Cats
.../cats/ GET Get all cats 😸
.../cats/ POST Create new cat 😻
.../cats/{cat_pk}/ GET Get info for a specific cat 🐱
.../cats/{cat_pk}/ PUT Update information about a cat 😼
.../cats/{cat_pk}/ DELETE Delete a cat 😿
.../cats/{cat_pk}/vaccine POST Add a vaccine to a cat 🙀

About

A basic aiohttp server with few endpoints.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published