Skip to main content

No project description provided

Project description

๐Ÿš€ Karigor CLI

Laravel Artisan Inspired CLI Tool for Python Developers

Karigor helps you bootstrap scalable Python applications, manage database migrations, generate code scaffolding, and streamline development workflows with a familiar Artisan-like experience.


โšก Quick Commands

karigor init
karigor serve
karigor db:install
karigor create:migration users
karigor migrate "create users table"
karigor create:model app/models/User.py
karigor create:controller app/controllers/UserController.py

๐ŸŽฏ Available Commands

Command Description
karigor init Initialize a new project
karigor serve Run the application
karigor db:install Install Alembic and database drivers
karigor create:migration <name> Create migration file
karigor migrate "<message>" Generate and run migrations
karigor create:model <path> Generate a model class
karigor create:controller <path> Generate a controller class

๐Ÿ“ฆ Installation

Install from PyPI:

pip install karigor

Verify installation:

karigor --help

๐Ÿš€ Getting Started

Create a new project:

karigor init

Start the application:

karigor serve

๐Ÿ—๏ธ Command Reference

โšก karigor init

Initialize a new Karigor project.

karigor init

What it creates

app/
config/
database/

main.py
.env
.env.example

Installed Packages

fastapi
uvicorn[standard]
pydantic-settings
sqlalchemy

โ–ถ๏ธ karigor serve

Run your application.

karigor serve

Equivalent:

python main.py

If main.py is missing, Karigor will suggest running:

karigor init

๐Ÿ—„๏ธ karigor db:install

Install database support and Alembic.

karigor db:install

Installs

alembic

Optional Drivers:

PostgreSQL

psycopg2-binary

MySQL

pymysql
mysqlclient

Generates

alembic/
alembic/env.py

๐Ÿ“ karigor create:migration

Generate a migration file.

karigor create:migration users

Features

  • Automatic migration registration
  • Duplicate table protection
  • Smart singular/plural naming
  • SQLAlchemy compatible

Generated in:

database/migrations/

๐Ÿ”„ karigor migrate

Generate and execute migrations.

karigor migrate "create users table"

Internally runs:

alembic revision --autogenerate -m "create users table"
alembic upgrade head

๐Ÿ—๏ธ karigor create:model

Generate a model file.

karigor create:model app/models/User.py

Generated Template:

class User:
    pass

๐ŸŽฎ karigor create:controller

Generate a controller file.

karigor create:controller app/controllers/UserController.py

Generated Template:

class UserController:
    pass

๐Ÿ“ Project Structure

After running:

karigor init

Your project structure will look like:

project/

โ”œโ”€โ”€ app/
โ”‚   โ”œโ”€โ”€ controllers/
โ”‚   โ”œโ”€โ”€ models/
โ”‚   โ””โ”€โ”€ __init__.py
โ”‚
โ”œโ”€โ”€ config/
โ”‚   โ”œโ”€โ”€ env_setting.py
โ”‚   โ”œโ”€โ”€ meta_data.py
โ”‚
โ”œโ”€โ”€ database/
โ”‚   โ”œโ”€โ”€ migrations/
โ”‚   โ”‚   โ””โ”€โ”€ base.py
โ”‚
โ”œโ”€โ”€ main.py
โ”œโ”€โ”€ .env
โ”œโ”€โ”€ .env.example
โ”‚
โ””โ”€โ”€ alembic/

โšก Typical Workflow

1. Create Project

karigor init

2. Install Database Support

karigor db:install

3. Create Models

karigor create:model app/models/User.py

4. Generate Migration

karigor create:migration users

5. Run Migration

karigor migrate "create users table"

6. Start Application

karigor serve

โค๏ธ Why Karigor?

Karigor brings Laravel Artisan-like productivity to Python projects.

Benefits

โœ… Fast Project Setup

โœ… Migration Management

โœ… Model Generator

โœ… Controller Generator

โœ… Interactive CLI

โœ… FastAPI Ready

โœ… SQLAlchemy Ready

โœ… Clean Folder Structure

โœ… Rich Terminal Output


๐Ÿ”ง Requirements

  • Python 3.10+
  • FastAPI
  • SQLAlchemy
  • Alembic

Most dependencies are installed automatically by Karigor.


๐Ÿ›ฃ๏ธ Roadmap

Upcoming features:

  • Repository Generator
  • Service Generator
  • Route Generator
  • CRUD Generator
  • Authentication Boilerplate
  • Docker Support
  • Clean Architecture Template
  • Async SQLAlchemy Support
  • PostgreSQL Extensions

๐Ÿค Contributing

Contributions are welcome.

Clone the repository:

git clone https://github.com/yourusername/karigor.git

cd karigor

pip install -e .

Run tests:

pytest

Please open an issue before submitting major changes.


๐Ÿ“„ License

MIT License


Made with โค๏ธ for Python Developers

Karigor โ€” Build Faster, Code Smarter.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

karigor-1.3.0.tar.gz (17.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

karigor-1.3.0-py3-none-any.whl (20.7 kB view details)

Uploaded Python 3

File details

Details for the file karigor-1.3.0.tar.gz.

File metadata

  • Download URL: karigor-1.3.0.tar.gz
  • Upload date:
  • Size: 17.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for karigor-1.3.0.tar.gz
Algorithm Hash digest
SHA256 ce6b404ba376d3c7bf3c294d3dcef5b6f9d807d9c259b2ab37314c8aefa97ca8
MD5 c9e297bce524adb04a2e3a546e74a4f9
BLAKE2b-256 c05730f5248741a07e3fe5f7c14a7d444400f104707904a091ac1011b47d3c39

See more details on using hashes here.

Provenance

The following attestation bundles were made for karigor-1.3.0.tar.gz:

Publisher: publish.yml on tawhidjony/karigor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file karigor-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: karigor-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 20.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for karigor-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 26db23eaa35e89fb51edd408bf473316c339492121bcf82ac720ac3c59aeb4f1
MD5 1597637446d348e9b641b75f3f622a90
BLAKE2b-256 eb63d0dbc3fba7b4b3cba6650ae0fc84cffb71caa168a68fbca395bad0c3826c

See more details on using hashes here.

Provenance

The following attestation bundles were made for karigor-1.3.0-py3-none-any.whl:

Publisher: publish.yml on tawhidjony/karigor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page