GreatAPI is a full-stack FastAPI framework designed to simplify and accelerate web application development. It leverages the power of FastAPI and integrates various essential tools to provide a seamless development experience.
Explore our comprehensive documentation to get started with GreatAPI: Documentation
Find the source code on GitHub: GitHub Repository
Install GreatAPI using PyPI: PyPI Package
Major contributors to GreatAPI:
- @thebrowl -> Admin Panel Design
- @lamdiv -> Admin Panel Development with Jinja2
- @Avi777 -> Consultant
Before we dive into the tutorial, make sure you have the following requirements in place:
- Python 3.6 or higher installed on your system.
- Familiarity with Python programming language concepts.
GreatAPI is built upon the foundation of the following robust libraries:
- FastAPI: A modern, fast, web framework for building APIs with Python.
- uvicorn: ASGI server that runs FastAPI applications.
- typer: A command-line interface library for building CLI applications.
- jinja2: A templating engine for Python.
- SQLAlchemy: A powerful Object-Relational Mapping (ORM) library for Python.
To install GreatAPI and its dependencies, use pip
:
pip install greatapi
To begin working with GreatAPI, let's create a new project. Open your terminal and execute the following command:
greatapi startproject myproject
This will create a new directory named "myproject" with the basic structure to get you started.
myproject/
├──__init__.py
├──settings.py
main.py
An app in GreatAPI is a modular unit that encapsulates specific functionality of your project. To create a new app, run the following command:
greatapi startapp myapp
This will generate a new directory named "myapp" containing the necessary files and folders for your app.
myapp/
├──__init__.py
├──models.py
├──repository.py
├──router.py
├──schemas.py
Now, it's time to run the development server. Execute the following command:
greatapi runserver
After running the server, let's create a superuser to manage the administration of your project. Execute the following command:
greatapi createsuperuser
Follow the prompts to create the superuser account and again run the server.
The server will start, and you can access your application at http://localhost:8000/. Additionally, GreatAPI provides a beautifully designed built-in Admin Panel accessible at http://localhost:8000/admin.