All Projects → yezz123 → Apollo

yezz123 / Apollo

Licence: other
A basic Application with multiple functionalities built with FastAPI aim to help Users Buy New Items Provided using PaypalAPI 🚀

Programming Languages

python
139335 projects - #7 most used programming language
CSS
56736 projects
HTML
75241 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to Apollo

fastrates
💵 Free & open source API service for current and historical foreign exchange rates.
Stars: ✭ 26 (+18.18%)
Mutual labels:  sqlalchemy, fastapi, fastapi-sqlalchemy
Db To Sqlite
CLI tool for exporting tables or queries from any SQL database to a SQLite file
Stars: ✭ 219 (+895.45%)
Mutual labels:  sqlalchemy, sqlite
Choochoo
Training Diary
Stars: ✭ 186 (+745.45%)
Mutual labels:  sqlalchemy, sqlite
FRDP
Boilerplate code for quick docker implementation of REST API with JWT Authentication using FastAPI, PostgreSQL and PgAdmin ⭐
Stars: ✭ 55 (+150%)
Mutual labels:  sqlalchemy, fastapi
nim-gatabase
Connection-Pooling Compile-Time ORM for Nim
Stars: ✭ 103 (+368.18%)
Mutual labels:  sqlalchemy, sqlite
fastapi-sqlalchemy-1.4-async
https://rogulski.it/blog/sqlalchemy-14-async-orm-with-fastapi/
Stars: ✭ 17 (-22.73%)
Mutual labels:  sqlalchemy, fastapi
tifa
Yet another opinionated fastapi-start-kit with best practice
Stars: ✭ 82 (+272.73%)
Mutual labels:  sqlalchemy, fastapi
fast-api-sqlalchemy-template
Dockerized web application on FastAPI, sqlalchemy1.4, PostgreSQL
Stars: ✭ 25 (+13.64%)
Mutual labels:  sqlalchemy, fastapi
CourseCake
By serving course 📚 data that is more "edible" 🍰 for developers, we hope CourseCake offers a smooth approach to build useful tools for students.
Stars: ✭ 21 (-4.55%)
Mutual labels:  sqlalchemy, fastapi
PayPalPlugin
Official integration with PayPal Commerce Platform
Stars: ✭ 21 (-4.55%)
Mutual labels:  ecommerce, paypal
favv
Fullstack Web Application Framework With FastAPI + Vite + VueJS. Streamlit for rapid development.
Stars: ✭ 17 (-22.73%)
Mutual labels:  sqlalchemy, fastapi
fastapi-boilerplate
FastAPI boilerplate for real world production
Stars: ✭ 145 (+559.09%)
Mutual labels:  sqlalchemy, fastapi
ChefAPI
API using FastAPI and PostgreSQL for sharing or keeping track of awesome food recipes Based on Oauth2 and JWT 💎
Stars: ✭ 16 (-27.27%)
Mutual labels:  sqlalchemy, fastapi
Databases
Async database support for Python. 🗄
Stars: ✭ 2,602 (+11727.27%)
Mutual labels:  sqlalchemy, sqlite
fastapi-starter
A FastAPI based low code starter: Async SQLAlchemy, Postgres, React-Admin, pytest and cypress
Stars: ✭ 97 (+340.91%)
Mutual labels:  sqlalchemy, fastapi
fastapi-debug-toolbar
A debug toolbar for FastAPI.
Stars: ✭ 90 (+309.09%)
Mutual labels:  sqlalchemy, fastapi
cloudrun-fastapi
FastAPI on Google Cloud Run
Stars: ✭ 112 (+409.09%)
Mutual labels:  sqlalchemy, fastapi
FastAPI-Full-Stack-Samples
The API Application Development using Python FastAPI, including interactive API documentation
Stars: ✭ 61 (+177.27%)
Mutual labels:  sqlalchemy, fastapi
lrnfast
FastAPI Notes Example using databases and postgresql
Stars: ✭ 12 (-45.45%)
Mutual labels:  fastapi, fastapi-crud
fastapi-saas-base
Fast API SAAS Base App
Stars: ✭ 47 (+113.64%)
Mutual labels:  sqlalchemy, fastapi

apollo

Apollo

A basic Application with multiple functionalities built with FastAPI aim to help Users Buy New Items Provided by PaypalAPI to Complete the Payment and Check it.

Getting Started

Apollo provide a Basic API Compose :

  1. Users
    1. login : http://localhost:8000 user/login
    2. Register : http://localhost:8000/user/register
    3. Get User : http://localhost:8000/user/get_user/{username}
  2. Items
    1. Add Item : http://localhost:8000/item/add_item
    2. Get Item : http://localhost:8000/item/get_item/{id}
    3. Delete Item : http://localhost:8000/item/get_item/{id}
  3. Payment
    1. Add Item to Cart : http://localhost:8000/cart/add_to_cart/{username}
    2. Provide Item to Payments : http://localhost:8000/cart/payment
    3. Money Callback : http://localhost:8000/cart/callback
    4. Delete Cart Item : http://localhost:8000/cart/delete_cart_item/{id}

I pre-configured the Cruds with the payment process based on PaypalAPI, you can read the Official docs here REST APIs / API Requests

Prerequisites

  • Python 3.9.2 or higher
  • FastAPI
  • Docker

Project setup

# clone the repo
$ git clone https://github.com/yezz123/Apollo.git

# move to the project folder
$ cd Apollo

Creating virtual environment

  • Install pipenv a global python project pip install pipenv
  • Create a virtual environment for this project
# creating pipenv environment for python 3
$ pipenv --three

# activating the pipenv environment
$ pipenv shell

# if you have multiple python 3 versions installed then
$ pipenv install -d --python 3.8

# install all dependencies (include -d for installing dev dependencies)
$ pipenv install -d

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

## To run the Application under a reload enviromment use -- reload
$ uvicorn main:app --reload

Configured Enviromment

  • To Provide a good work, i choose a SQLite Database using SQLAlchemy.

  • If you want to configure the Database with an other Provider like MySQL or PostgreSQL you can change the Database_URL here :

  • Database.py :

# here you need to insert the Connection URL.
SQLALCHEMY_DATABASE_URL = 'sqlite:///apollo.db'
  • For Example
SQLALCHEMY_DATABASE_URL = 'mysql://username:password@server/apollo'

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.
$ docker build
  • list all the docker images and you can also see the image apollo:latest in the list.
$ docker images
  • run the application at port 5000. The various options used are:
  • -p: publish the container's port to the host port.
  • -d: run the container in the background.
  • -i: run the container in interactive mode.
  • -t: to allocate pseudo-TTY.
  • --name: name of the container
$ docker container run -p 5000:5000 -dit --name Apollo apollo:latest
  • Check the status of the docker container
$ docker container ps

Preconfigured Packages

Includes preconfigured packages to kick start Apollo API by just setting appropriate configuration.

Package Usage
uvicorn a lightning-fast ASGI server implementation, using uvloop and httptools.
PaypalAPI exchange these credentials for an access token that authorizes your REST API calls. To test your web and mobile apps.
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.

yapf packages for linting and formatting

Contributing

  • Join the Apollo 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.

License

This program is free software under MIT license. Please see the LICENSE file in our repository for the full text.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].