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.1.1.tar.gz (13.7 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.1.1-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for karigor-1.1.1.tar.gz
Algorithm Hash digest
SHA256 32f7bfd4f2a9f8905ae887bb7e4f7cbdb4cfdfb83912f9a66f31b2e9156886f6
MD5 67b5e519c0ad7d70f7f4bb5084ac6b44
BLAKE2b-256 6d59d2756dd9c0578410e8f085f40429ba202faa413a759059c20ed100ceaf12

See more details on using hashes here.

Provenance

The following attestation bundles were made for karigor-1.1.1.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.1.1-py3-none-any.whl.

File metadata

  • Download URL: karigor-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 14.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.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e3463fe189a320e91a06a2e5bdb42f66de7157bec922d8899f17de9edcc51b74
MD5 c5db1cc0d08d8689ea0e2ae23670fe19
BLAKE2b-256 cab65932866c82f319441c038cf81d841eaa4ff20f4d4ce291201c25eb108d98

See more details on using hashes here.

Provenance

The following attestation bundles were made for karigor-1.1.1-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