zeon


Namezeon JSON
Version 1.0.1 PyPI version JSON
download
home_pageNone
SummaryA powerful CLI tool to scaffold and manage FastAPI projects with authentication, database migrations, and more
upload_time2025-09-07 17:48:13
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords fastapi cli scaffolding web api authentication jwt sqlalchemy alembic
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Zeon 🧬

**Zeon** is a powerful Python-based CLI tool that instantly scaffolds a complete FastAPI project with built-in authentication, user management, JWT handling, database migrations, and environment-based configuration. It provides a comprehensive set of commands to manage your FastAPI project lifecycle.

---

## ✨ Features

- 🚀 **FastAPI Project Scaffolding** - Generate complete project structure instantly
- 🔐 **JWT Authentication** - Built-in user authentication with OAuth2 and JWT tokens
- 🗄️ **Database Management** - SQLite + SQLAlchemy ORM with pre-configured models
- � **Database Migrations** - Optional Alembic integration for database versioning
- 🛠️ **Router Generation** - Create new API routers with automatic registration
- 📦 **Package Management** - Install packages and update requirements.txt automatically
- 🔒 **Security Utils** - Password hashing with bcrypt
- 🌐 **Environment Configuration** - Secure environment variable management
- 📁 **Organized Structure** - Clean separation of concerns (routers, models, schemas)
- 🐍 **Virtual Environment** - Automatic virtual environment creation and management

---

## 📦 Installation

To install Zeon from [PyPI](https://pypi.org/project/zeon/):

```bash
pip install zeon
```

---

## 🚀 Quick Start

### Initialize a New Project

```bash
zeon init myproject
```

This creates a complete FastAPI project with the following structure:

```
myproject/
├── venv/                    # Virtual environment
├── app/
│   ├── __init__.py
│   ├── main.py             # FastAPI app entry point
│   ├── database.py         # Database configuration
│   ├── models.py           # SQLAlchemy models (User model included)
│   ├── schemas.py          # Pydantic schemas
│   ├── utils.py            # Utility functions (password hashing)
│   ├── oauth2.py           # JWT authentication logic
│   └── routers/
│       ├── __init__.py
│       └── auth.py         # Authentication endpoints
├── alembic/                # Database migrations (optional)
├── alembic.ini            # Alembic configuration (optional)
├── .env                   # Environment variables
├── .gitignore            # Git ignore file
└── requirements.txt      # Python dependencies
```

---

## 📚 Commands

### Project Initialization

```bash
zeon init <project_name>
```
- Creates complete FastAPI project structure
- Sets up virtual environment
- Installs all dependencies
- Optionally configures Alembic for database migrations
- Generates secure environment variables

### Router Management

```bash
zeon routers <router_name> [project_name]
```
- Creates a new router in `app/routers/`
- Automatically adds import and registration to `main.py`
- Includes basic GET endpoint template

Example:
```bash
zeon routers users
# Creates app/routers/users.py and registers it in main.py
```

### Package Management

```bash
zeon add <package_name> [project_name]
```
- Installs package in the project's virtual environment
- Automatically updates `requirements.txt` with all dependencies

Example:
```bash
zeon add redis
# Installs redis and updates requirements.txt
```

### Database Migrations (Alembic)

```bash
# Create migration
zeon makemigrations [message] [project_name]

# Apply migrations
zeon migrate [project_name]
```

Examples:
```bash
zeon makemigrations "Add user profile"
zeon migrate
```

---

## 🔐 Built-in Authentication

Zeon includes a complete authentication system:

### Endpoints
- `POST /auth/register` - User registration
- `POST /auth/login` - User login (returns JWT token)
- `GET /auth/user/{id}` - Get user by ID

### Features
- Password hashing with bcrypt
- JWT token generation and validation
- OAuth2 password flow
- User model with SQLAlchemy
- Pydantic schemas for validation

### Example Usage

```python
# Register a new user
POST /auth/register
{
    "username": "john_doe",
    "email": "john@example.com", 
    "password": "securepassword"
}

# Login
POST /auth/login
Form data: username=john_doe&password=securepassword

# Response
{
    "access_token": "eyJ0eXAiOiJKV1QiLCJhbGci...",
    "token_type": "bearer"
}
```

---

## 🔧 Environment Configuration

Zeon automatically generates a `.env` file with:

```env
SECRET_KEY=<auto-generated-secure-key>
ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=30
```

---

## 🚀 Running Your Project

After creating a project:

```bash
cd myproject

# Activate virtual environment
# Windows
venv\Scripts\activate
# Unix/macOS
source venv/bin/activate

# Run the development server
uvicorn app.main:app --reload
```

Your API will be available at `http://localhost:8000` with automatic documentation at `http://localhost:8000/docs`.

---

## 📋 Requirements

- Python 3.8+
- pip

---

## 🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

---

## 📄 License

This project is licensed under the MIT License.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "zeon",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "fastapi, cli, scaffolding, web, api, authentication, jwt, sqlalchemy, alembic",
    "author": null,
    "author_email": "Vinyas Bharadwaj <vinyasbharadwaj101@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/84/37/2b6cfca891cc0a88b493cd436a01053664e7293abc139e4e692cdfa1760e/zeon-1.0.1.tar.gz",
    "platform": null,
    "description": "# Zeon \ud83e\uddec\r\n\r\n**Zeon** is a powerful Python-based CLI tool that instantly scaffolds a complete FastAPI project with built-in authentication, user management, JWT handling, database migrations, and environment-based configuration. It provides a comprehensive set of commands to manage your FastAPI project lifecycle.\r\n\r\n---\r\n\r\n## \u2728 Features\r\n\r\n- \ud83d\ude80 **FastAPI Project Scaffolding** - Generate complete project structure instantly\r\n- \ud83d\udd10 **JWT Authentication** - Built-in user authentication with OAuth2 and JWT tokens\r\n- \ud83d\uddc4\ufe0f **Database Management** - SQLite + SQLAlchemy ORM with pre-configured models\r\n- \ufffd **Database Migrations** - Optional Alembic integration for database versioning\r\n- \ud83d\udee0\ufe0f **Router Generation** - Create new API routers with automatic registration\r\n- \ud83d\udce6 **Package Management** - Install packages and update requirements.txt automatically\r\n- \ud83d\udd12 **Security Utils** - Password hashing with bcrypt\r\n- \ud83c\udf10 **Environment Configuration** - Secure environment variable management\r\n- \ud83d\udcc1 **Organized Structure** - Clean separation of concerns (routers, models, schemas)\r\n- \ud83d\udc0d **Virtual Environment** - Automatic virtual environment creation and management\r\n\r\n---\r\n\r\n## \ud83d\udce6 Installation\r\n\r\nTo install Zeon from [PyPI](https://pypi.org/project/zeon/):\r\n\r\n```bash\r\npip install zeon\r\n```\r\n\r\n---\r\n\r\n## \ud83d\ude80 Quick Start\r\n\r\n### Initialize a New Project\r\n\r\n```bash\r\nzeon init myproject\r\n```\r\n\r\nThis creates a complete FastAPI project with the following structure:\r\n\r\n```\r\nmyproject/\r\n\u251c\u2500\u2500 venv/                    # Virtual environment\r\n\u251c\u2500\u2500 app/\r\n\u2502   \u251c\u2500\u2500 __init__.py\r\n\u2502   \u251c\u2500\u2500 main.py             # FastAPI app entry point\r\n\u2502   \u251c\u2500\u2500 database.py         # Database configuration\r\n\u2502   \u251c\u2500\u2500 models.py           # SQLAlchemy models (User model included)\r\n\u2502   \u251c\u2500\u2500 schemas.py          # Pydantic schemas\r\n\u2502   \u251c\u2500\u2500 utils.py            # Utility functions (password hashing)\r\n\u2502   \u251c\u2500\u2500 oauth2.py           # JWT authentication logic\r\n\u2502   \u2514\u2500\u2500 routers/\r\n\u2502       \u251c\u2500\u2500 __init__.py\r\n\u2502       \u2514\u2500\u2500 auth.py         # Authentication endpoints\r\n\u251c\u2500\u2500 alembic/                # Database migrations (optional)\r\n\u251c\u2500\u2500 alembic.ini            # Alembic configuration (optional)\r\n\u251c\u2500\u2500 .env                   # Environment variables\r\n\u251c\u2500\u2500 .gitignore            # Git ignore file\r\n\u2514\u2500\u2500 requirements.txt      # Python dependencies\r\n```\r\n\r\n---\r\n\r\n## \ud83d\udcda Commands\r\n\r\n### Project Initialization\r\n\r\n```bash\r\nzeon init <project_name>\r\n```\r\n- Creates complete FastAPI project structure\r\n- Sets up virtual environment\r\n- Installs all dependencies\r\n- Optionally configures Alembic for database migrations\r\n- Generates secure environment variables\r\n\r\n### Router Management\r\n\r\n```bash\r\nzeon routers <router_name> [project_name]\r\n```\r\n- Creates a new router in `app/routers/`\r\n- Automatically adds import and registration to `main.py`\r\n- Includes basic GET endpoint template\r\n\r\nExample:\r\n```bash\r\nzeon routers users\r\n# Creates app/routers/users.py and registers it in main.py\r\n```\r\n\r\n### Package Management\r\n\r\n```bash\r\nzeon add <package_name> [project_name]\r\n```\r\n- Installs package in the project's virtual environment\r\n- Automatically updates `requirements.txt` with all dependencies\r\n\r\nExample:\r\n```bash\r\nzeon add redis\r\n# Installs redis and updates requirements.txt\r\n```\r\n\r\n### Database Migrations (Alembic)\r\n\r\n```bash\r\n# Create migration\r\nzeon makemigrations [message] [project_name]\r\n\r\n# Apply migrations\r\nzeon migrate [project_name]\r\n```\r\n\r\nExamples:\r\n```bash\r\nzeon makemigrations \"Add user profile\"\r\nzeon migrate\r\n```\r\n\r\n---\r\n\r\n## \ud83d\udd10 Built-in Authentication\r\n\r\nZeon includes a complete authentication system:\r\n\r\n### Endpoints\r\n- `POST /auth/register` - User registration\r\n- `POST /auth/login` - User login (returns JWT token)\r\n- `GET /auth/user/{id}` - Get user by ID\r\n\r\n### Features\r\n- Password hashing with bcrypt\r\n- JWT token generation and validation\r\n- OAuth2 password flow\r\n- User model with SQLAlchemy\r\n- Pydantic schemas for validation\r\n\r\n### Example Usage\r\n\r\n```python\r\n# Register a new user\r\nPOST /auth/register\r\n{\r\n    \"username\": \"john_doe\",\r\n    \"email\": \"john@example.com\", \r\n    \"password\": \"securepassword\"\r\n}\r\n\r\n# Login\r\nPOST /auth/login\r\nForm data: username=john_doe&password=securepassword\r\n\r\n# Response\r\n{\r\n    \"access_token\": \"eyJ0eXAiOiJKV1QiLCJhbGci...\",\r\n    \"token_type\": \"bearer\"\r\n}\r\n```\r\n\r\n---\r\n\r\n## \ud83d\udd27 Environment Configuration\r\n\r\nZeon automatically generates a `.env` file with:\r\n\r\n```env\r\nSECRET_KEY=<auto-generated-secure-key>\r\nALGORITHM=HS256\r\nACCESS_TOKEN_EXPIRE_MINUTES=30\r\n```\r\n\r\n---\r\n\r\n## \ud83d\ude80 Running Your Project\r\n\r\nAfter creating a project:\r\n\r\n```bash\r\ncd myproject\r\n\r\n# Activate virtual environment\r\n# Windows\r\nvenv\\Scripts\\activate\r\n# Unix/macOS\r\nsource venv/bin/activate\r\n\r\n# Run the development server\r\nuvicorn app.main:app --reload\r\n```\r\n\r\nYour API will be available at `http://localhost:8000` with automatic documentation at `http://localhost:8000/docs`.\r\n\r\n---\r\n\r\n## \ud83d\udccb Requirements\r\n\r\n- Python 3.8+\r\n- pip\r\n\r\n---\r\n\r\n## \ud83e\udd1d Contributing\r\n\r\nContributions are welcome! Please feel free to submit a Pull Request.\r\n\r\n---\r\n\r\n## \ud83d\udcc4 License\r\n\r\nThis project is licensed under the MIT License.\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A powerful CLI tool to scaffold and manage FastAPI projects with authentication, database migrations, and more",
    "version": "1.0.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/vinyasbharadwaj/zeon/issues",
        "Documentation": "https://github.com/vinyasbharadwaj/zeon#readme",
        "Homepage": "https://github.com/vinyasbharadwaj/zeon",
        "Repository": "https://github.com/vinyasbharadwaj/zeon"
    },
    "split_keywords": [
        "fastapi",
        " cli",
        " scaffolding",
        " web",
        " api",
        " authentication",
        " jwt",
        " sqlalchemy",
        " alembic"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "01bf9eec894ff29875c282c84af96da119074b98687748460bec53381ee47a64",
                "md5": "c278c1f991270ca271754e60664d02b0",
                "sha256": "64d929942f9313b66566b9b6da96dec5c69420fe835ecfda2ca332d6c96dbe77"
            },
            "downloads": -1,
            "filename": "zeon-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c278c1f991270ca271754e60664d02b0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 9146,
            "upload_time": "2025-09-07T17:48:12",
            "upload_time_iso_8601": "2025-09-07T17:48:12.552692Z",
            "url": "https://files.pythonhosted.org/packages/01/bf/9eec894ff29875c282c84af96da119074b98687748460bec53381ee47a64/zeon-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "84372b6cfca891cc0a88b493cd436a01053664e7293abc139e4e692cdfa1760e",
                "md5": "5dbc834667b0bd0729b678bd17b85695",
                "sha256": "cffaaf9d717eb84b8e388e70f886aacaf49fe2af2df9cacb61082bee72d09875"
            },
            "downloads": -1,
            "filename": "zeon-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "5dbc834667b0bd0729b678bd17b85695",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 10722,
            "upload_time": "2025-09-07T17:48:13",
            "upload_time_iso_8601": "2025-09-07T17:48:13.619368Z",
            "url": "https://files.pythonhosted.org/packages/84/37/2b6cfca891cc0a88b493cd436a01053664e7293abc139e4e692cdfa1760e/zeon-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-07 17:48:13",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "vinyasbharadwaj",
    "github_project": "zeon",
    "github_not_found": true,
    "lcname": "zeon"
}
        
Elapsed time: 0.47426s