DogeAPI
API with high performance to create a simple blog and Auth using OAuth2 ⛏
Install / Use
/learn @yezz123/DogeAPIREADME
DogeAPI
API with high performance built with FastAPI & SQLAlchemy, help to improve connection with your Backend Side to create a simple blog and Cruds with OAuth2PasswordBearer ⛏
Getting Started
Prerequisites
- Python 3.8.6 or higher
- FastAPI
- Docker
Project Setup
# clone the repo
$ git clone https://github.com/yezz123/DogeAPI
# move to the project folder
$ cd DogeAPI
Creating Virtual Environment
- Create a virtual environment using virtualenv.
# creating virtual environment
$ virtualenv venv
# activate virtual environment
$ source venv/bin/activate
# install all dependencies
$ pip install -r requirements.txt
Running the Application
- To run the Main we need to use uvicorn a lightning-fast ASGI server implementation, using uvloop and httptools.
# Running the application using uvicorn
$ uvicorn main:app --reload
Environment Variables
SECRET_KEY: A secret key for signing Json Web Token.DATABASE_URL: The database url to connect to the database.ACCESS_TOKEN_EXPIRE_MINUTES: The access token expire minutes.
change all the environment variables in the
.env.sampleand don't forget to rename it to.env.
Configured Environment
Models
- Here for the Models.py, i create 2 tables based on the requirements for this project
blogsandusers
Running the Docker Container
- We have the Dockerfile created in above section. Now, we will use the Dockerfile to create the image of the FastAPI app and then start the FastAPI app container.
- Using a preconfigured
Makefiletor run the Docker Compose:
# Pull the latest image
$ make pull
# Build the image
$ make build
# Run the container
$ make start
Preconfigured Packages
Includes preconfigured packages to kick start DogeAPI by just setting appropriate configuration.
| Package | Usage | | ------------------------------------------------------------ | ---------------------------------------------------------------- | | uvicorn | a lightning-fast ASGI server implementation, using uvloop and httptools. | | Python-Jose | a JavaScript Object Signing and Encryption implementation in Python. | | SQLAlchemy | is the Python SQL toolkit and Object Relational Mapper that gives application developers the full power and flexibility of SQL. | | starlette | a lightweight ASGI framework/toolkit, which is ideal for building high performance asyncio services. | | passlib | a password hashing library for Python 2 & 3, which provides cross-platform implementations of over 30 password hashing algorithms | | bcrypt | Good password hashing for your software and your servers. | | python-multipart | streaming multipart parser for Python. |
yapf packages for linting and formatting
Contributing
- Join the DOGEAPI Creator and Contribute to the Project if you have any enhancement or add-ons to create a good and Secure Project, Help any User to Use it in a good and simple way.
- Check all information here at docs's Folder to understand to how to contribute or to Read the Code of Conduct.
License
This project is licensed under the terms of the MIT license.
Related Skills
gh-issues
336.2kFetch GitHub issues, spawn sub-agents to implement fixes and open PRs, then monitor and address PR review comments. Usage: /gh-issues [owner/repo] [--label bug] [--limit 5] [--milestone v1.0] [--assignee @me] [--fork user/repo] [--watch] [--interval 5] [--reviews-only] [--cron] [--dry-run] [--model glm-5] [--notify-channel -1002381931352]
oracle
336.2kBest practices for using the oracle CLI (prompt + file bundling, engines, sessions, and file attachment patterns).
tmux
336.2kRemote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.
xurl
336.2kA CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.
