Coder Social home page Coder Social logo

files-aiohttp's Introduction

Files app

Apps

files

  • contains 6 API handlers (register, login, files, files_detail, files_upload, files_download_detail)
  • API: logged-in users can both upload and download files, unauthorized users can register, login and get files/files_details

Features

auth_middleware

Upload/download API handlers processed by auth_middleware - simple jwt token implementation described in middlewares.py

aiohttp-admin

Simple aiohttp-admin for user and file models

swagger

Each API endpoint described. loads from .json file.

docker

There are two docker configurations - local.yml and production.yml. production one uses nginx web-server to serve file uploads and main app

tests

App contains tests for API handlers using aiohttp-pytest. some of them load data from json-fixtures

Installation

  • docker-compose -f production.yml build
  • docker-compose -f production.yml up
  • to run tests: docker-compose -f local.yml run aio pytest tests
  • swagger available on 127.0.0.1:8000, but you can always use Insomnia or such thing to test API.
  • aiohttp-admin available on 127.0.0.1/admin user:admin password:admin_pass

files-aiohttp's People

Watchers

James Cloos avatar Vadim Bereznitskiy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.