sahajrajmalla/greatapi
sahajrajmalla/greatapi has 76 GitHub stars and 8 forks. Star changes are not measured yet. Last checked 2026-11-13 02:06 UTC. Last push 2026-09-28.
GreatAPI framework, Full-stack FastAPI framework
측정된 스타 증가
- in 24h
- 기록 수집 중
- in 7 days
- 기록 수집 중
- in 15 days
- 기록 수집 중
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalThe batteries-included FastAPI framework. Admin, auth, migrations, jobs and streaming out of the box — so you ship the backend instead of the plumbing.

FastAPI gives you a superb routing and validation layer and then stops. Every team builds the same next thing by hand: an admin, a login, Alembic wiring, a job queue, API keys. GreatAPI is that layer, and it is the same one whether you are serving a CRUD API or an LLM.
pip install greatapi
greatapi startproject myapp && cd myapp
cp .env.example .env
greatapi migrate && greatapi createsuperuser
greatapi runserver
You now have an API on http://127.0.0.1:8000, OpenAPI docs at /docs, and a
working admin at /admin.
# main.py
from greatapi import GreatAPI
app = GreatAPI(title="myapp", installed_apps=["blog"])
# blog/admin.py
from greatapi import admin
from blog.models import Post
@admin.register(Post)
class PostAdmin(admin.ModelAdmin):
list_display = ("id", "title", "published", "created_at")
search_fields = ("title", "body")
That is the whole registration. greatapi startapp blog writes the model,
schemas, repository, router and admin file, and adds the app to
INSTALLED_APPS, so it serves requests and appears in the admin without
another edit.
What you get
| Admin | Real CRUD over any model, with search, pagination, forms generated from your columns, light/dark, and no CDN. |
| Auth | Argon2 passwords, HttpOnly sessions, CSRF, and a login that is not an account-enumeration oracle. |
| Migrations | Alembic behind greatapi makemigrations and greatapi migrate. |
| Jobs | A database-backed queue with retries and backoff, running in-process. No Redis, no Celery. |
| API keys | Scopes, per-key rate limits and monthly spend caps, managed from the admin. |
| Streaming | SSE done properly: heartbeats, correct framing, and cancellation when the client leaves. |
| Async | SQLAlchemy 2.0 AsyncSession throughout, so long-lived connections do not eat a thread each. |
The AI extra
pip install "greatapi[ai]"
from greatapi import ai
@app.post("/chat")
async def chat(request: Request, body: ChatIn):
return ai.sse(ai.stream("anthropic:claude-sonnet-5", body.prompt), request=request)
@ai.tool
async def lookup_order(order_id: int) -> dict:
"""Fetch an order by its id."""
...
agent = ai.Agent(model="anthropic:claude-sonnet-5", tools=[lookup_order], max_steps=8)
@app.post("/agent")
async def run(request: Request, body: ChatIn):
return ai.sse(agent.stream(body.prompt), request=request)
Tool schemas come from your type hints, so there is one source of truth. Every
call and every agent step is recorded with its model, tokens, cost, latency and
outcome, and shows up at /admin/usage — an agent run opens as a trace rather
than a number in a log line.
Models are addressed as provider:model:
| String | Needs |
|---|---|
echo:demo |
nothing — offline, deterministic, no API key |
anthropic:claude-sonnet-5 |
greatapi[anthropic] |
openai:gpt-5 |
greatapi[openai] |
local:llama3.2 |
greatapi[local] — httpx only; Ollama, vLLM, LM Studio, llama.cpp |
Try it without signing up for anything:
git clone https://github.com/sahajrajmalla/greatapi && cd greatapi
make install && make demo
Installing
pip install greatapi # the framework. no LLM dependency at all
pip install "greatapi[ai]" # + every provider and the agent tooling
pip install "greatapi[anthropic]" # + one provider
pip install "greatapi[local]" # + self-hosted models, httpx only
pip install "greatapi[postgres]" # + asyncpg
The AI code ships in the base wheel; only third-party SDKs live in the extras.
import greatapi.ai always works, and reaching for a provider you have not
installed tells you exactly what to install rather than raising an ImportError
from four frames down.
Commands
greatapi startproject <name> # a project that runs
greatapi startapp <name> # an app, registered for you
greatapi runserver --port 8000 # the dev server
greatapi makemigrations -m "message" # a migration from your model changes
greatapi migrate # apply them
greatapi createsuperuser # an admin account
greatapi routes # every route in the app
greatapi generate-secret # a signing key
Configuration
Everything is read from the environment or .env, prefixed GREATAPI_:
GREATAPI_SECRET_KEY=... # required; greatapi generate-secret
GREATAPI_DATABASE_URL=postgresql+asyncpg://u:p@host/db # any async SQLAlchemy URL
GREATAPI_DEBUG=false
SECRET_KEY has no default. With DEBUG off, a missing one stops the app
starting and tells you how to make one.
Documentation
https://greatapi.readthedocs.io — quickstart, tutorial, admin, migrations, jobs, API keys, AI providers, agents, deployment, and the full settings reference.
Upgrading from 1.x? See MIGRATION.md.
Contributing
git clone https://github.com/sahajrajmalla/greatapi && cd greatapi
make install
make check # ruff, mypy, and the test suite
make demo # see it work
Details in CONTRIBUTING.md. Issues and pull requests are welcome; good first issues are labelled.
Security
Please report vulnerabilities privately — see SECURITY.md.
Credits
Built by Sahaj Raj Malla.
Standing on FastAPI, Starlette, Pydantic, SQLAlchemy and Alembic.
MIT licensed.
관련 프로젝트 살펴보기
freeCodeCamp/freeCodeCamp
freeCodeCamp.org의 오픈 소스 코드베이스와 커리큘럼입니다. 수학, 프로그래밍, 컴퓨터 과학을 무료로 배울 수 있습니다.
459,072 스타donnemartin/system-design-primer
대규모 시스템 설계 방법을 배우고 시스템 설계 면접을 준비할 수 있습니다. Anki 플래시카드가 포함되어 있습니다.
377,745 스타react/react
웹과 네이티브 사용자 인터페이스를 위한 라이브러리.
252,569 스타vuejs/vue
Vue 2 저장소입니다. Vue 3은 https://github.com/vuejs/core를 방문하세요.
212,526 스타



