GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - unstoppableayush/fastapi-imagekit-auth: Simple FastAPI service with JWT auth, user management, and image upload via ImageKit. Uses async SQLAlchemy with SQLite.

BranchesTags
Open more actions menu

Latest commit

 

History

2 Commits
2 Commits

Folders and files

NameName
Last commit message
Last commit date
app
app
 
 
.env.sample
.env.sample
 
 
.gitignore
.gitignore
 
 
.python-version
.python-version
 
 
README.md
README.md
 
 
main.py
main.py
 
 
pyproject.toml
pyproject.toml
 
 
test.db
test.db
 
 
uv.lock
uv.lock
 
 

Repository files navigation

FastAPI Tutorial API

Simple FastAPI service with JWT auth, user management, and image upload via ImageKit. Uses async SQLAlchemy with SQLite.

Requirements

  • Python 3.10+
  • ImageKit account (for /upload)

Setup

  1. Create and activate a virtual environment.
  2. Install dependencies:
pip install .

If you use uv, run uv sync instead.

  1. Create a .env file in the project root:
IMAGEKIT_PRIVATE_KEY=your_private_key
IMAGEKIT_URL_ENDPOINT=https://ik.imagekit.io/your_account

Run

python main.py

The API starts at http://127.0.0.1:8000. Open docs at http://127.0.0.1:8000/docs.

Database

SQLite file: test.db (created on startup). Tables are created automatically at app startup.

Key Endpoints

  • POST /auth/jwt/login - login and receive JWT
  • POST /auth/register - register a user
  • POST /auth/forgot-password - request password reset
  • POST /auth/request-verify-token - request verification
  • GET /users - list users (auth required)
  • POST /upload - upload file + caption (ImageKit + DB record)
  • GET /posts - list posts
  • DELETE /posts/{post_id} - delete post

Upload Example

curl -X POST "http://127.0.0.1:8000/upload" \
	-H "Authorization: Bearer <JWT>" \
	-F "caption=Hello" \
	-F "file=@/path/to/image.jpg"

Notes

  • JWT secret is hardcoded in app/users.py for tutorial use only.
  • Image uploads require valid ImageKit credentials.

About

Simple FastAPI service with JWT auth, user management, and image upload via ImageKit. Uses async SQLAlchemy with SQLite.

Resources

Readme
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.