Giter Site home page Giter Site logo

colerutledge / taskapi Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 0.0 471 KB

:snake: a FastAPI server for a task management app with Python, Docker, Github Actions, and pytest.

Home Page: https://asana.colerutledge.dev/docs

Python 97.16% Dockerfile 1.57% Mako 0.48% CSS 0.02% HTML 0.78%

taskapi's Introduction

Thanks for checking out my project! ๐Ÿ‘‹

This is an API server for powering a task management application based on Asana


Continuous Integration and Delivery Test Coverage



I had a great time making this app over the course of a few weeks. To build on my experience from the App Academy bootcamp, I really tried to expand on my "infrastructure as code" skills by utilizing multistage Docker builds, layered caching, and Github Actions to build a simple CI/CD pipeline. It was immensely satisfying glueing the pieces of it together with the Python skills I've been developing over the prior few months and to see it become a more robust, maintainable project complete with ๐Ÿ’ฏ percent test coverage! (not a great metric, I know, but it was still fun to chase!)

Usage:

I have prepared a docker-compose file, so after cloning, you should only need to setup a few environment variables. The Pydantic Settings schema in app.config provides valid defaults for all of these, so it should run regardless, but the required environment variables in a .env file are:

APP_NAME="asana_fastapi"
DB_URL="sqlite:///app.db"
SECRET_KEY="dummykey"
ALGORITHM="HS256"                   # password hashing algorithm
ACCESS_TOKEN_EXPIRES_MINUTES=30     # auth token expiration

The project is setup with some SQLite defaults, but if planning to use PostgreSQL, the docker-compose requires the following in a .env.db file:

POSTGRES_USER="db_username"
POSTGRES_PASSWORD="db_password"
POSTGRES_DB="db_user"

Alternatively, you can just pull and run the dev or prod image from the GitHub Container Registry for this project by using one of these commands with the Docker CLI installed. After failing to find the image locally, Docker will look to the GitHub Container Registry for the image automatically.

docker run --name asana_fastapi -p 8000:80 -d --rm ghcr.io/colerutledge/asana_fastapi:dev
docker run --name asana_fastapi -p 8000:80 -d --rm ghcr.io/colerutledge/asana_fastapi:prod

You can reach the interactive API docs powered by Swagger/OpenAPI here: http://localhost:8000/docs

Alternative docs powered by ReDoc can be found here: http://localhost:8000/redoc


Link to live API Docs powered by OpenAPI
you may have to give Heroku a minute!

Swagger UI

taskapi's People

Contributors

colerutledge avatar

Stargazers

Mahdi Vafaii avatar Kumar Deepanshu avatar Yasin BOZAT avatar silence163 avatar  avatar  avatar

Watchers

James Cloos avatar  avatar

taskapi's Issues

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.