Skip to main content

pythoncms

First Timers Only

The fastest way to start a CMS in Python. Build production-grade sites with zero-config, modular themes, and a powerful content API.

🚀 Quickstart

The new unified CLI makes it easier than ever to get started:

pip install pythoncms
pythoncms start mysite --run

This single command will:

  1. Create your project directory.
  2. Generate a secure .env file.
  3. Initialise the database.
  4. Seed the default admin user.
  5. Start the development server.

Open: http://localhost:5000/dashboard
Login: admin@domain.com / pass


🛠️ Unified CLI Commands

Manage your entire project from one place:

  • pythoncms start <name>: Create a new project.
  • pythoncms run: Start the dev server.
  • pythoncms initialise: Set up database and assets.
  • pythoncms seed: Reset default data.
  • pythoncms deploy: Generate production files (Dockerfile, docker-compose.yml).
  • pythoncms --version: Check your version.

🚀 Production Deployment

Deploying your CMS with a production-grade Nginx reverse proxy is now a single command:

pythoncms deploy

This generates:

  • Dockerfile: Optimized for Gunicorn performance.
  • nginx.conf: Configured for request buffering and fast static file serving.
  • docker-compose.yml: Orchestrates the app and Nginx containers.

Quick Start

  1. Run pythoncms deploy.
  2. (Optional) Edit nginx.conf to add your domain.
  3. Run docker-compose up --build -d.

Your site will be live on port 80 with Nginx handling all incoming traffic.


📡 REST API

Your content is automatically exposed via a JSON API.

Endpoint: /api/v1/<content_type_name>

Pagination & Sorting

  • ?limit=10&offset=0
  • ?sort_by=created_at&order=desc

Authentication (Optional)

Set API_TOKEN in your .env to secure the API. Requests must then include header: Authorization: Bearer <API_TOKEN>


⚙️ Configuration

Your project settings are managed via the .env file in your root directory.

Database Connection

By default, pythoncms uses SQLite. To use a different database, update the SQLALCHEMY_DATABASE_URI:

# SQLite (default)
SQLALCHEMY_DATABASE_URI = "sqlite:///mysite.db"

# PostgreSQL
SQLALCHEMY_DATABASE_URI = "postgresql://user:password@localhost/dbname"

Other Settings

  • APP_NAME: Change the display name of your application.
  • SECRET_KEY: Used for session encryption. Automatically generated on start.
  • ACTIVE_FRONT_THEME: Choose between editorial or hyperspace.
  • ACTIVE_BACK_THEME: Choose between sneat or sbadmin.

✨ Features

  • 🏗️ Content Types: Define custom schemas with JSON.
  • 🎨 Theme Support: Switch between beautiful, responsive themes instantly.
  • 🔐 Built-in Auth: Secure admin and user management out of the box.
  • 🍱 Modular Architecture: Extend functionality with a robust plugin system.
  • 🖼️ Media Management: Simple upload and resource handling.
  • ⚡ Flask Powered: Minimal, fast, and easy to customize.

📸 See it in Action

Admin Dashboard

Admin Dashboard

Page Editor

Page Editor

Website Frontend

Website Frontend


🛠️ Local Development

If you want to contribute to the core or customize the engine:

  1. Clone and Install:

    python -m pip install -e .
    
  2. Initialize:

    cd pythoncms
    shopyo initialise
    flask --debug run
    
  3. Database Migrations:

    flask db migrate
    flask db upgrade
    

🎨 Themes & Customization

Themes are located at /static/themes/.

Front Themes

Must include index.html, contact.html, and page.html.

Back Themes

Must include base.html, login.html, register.html, and unconfirmed.html.


📄 License & Community


Powered by the Shopyo engine.

Release files for pythoncms 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pythoncms 2.0.0
File Size Uploaded
pythoncms-2.0.0.tar.gz 6.0 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for pythoncms 2.0.0
File Interpreter ABI Platform
pythoncms-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.0 MB

Release files / pythoncms-2.0.0.tar.gz

Download URL pythoncms-2.0.0.tar.gz
Size 6.0 MB
Tags Source
SHA-256 checksum
How to use checksums
8efe66a7be14bbf1f2199541ff84aae9103cad16dec08bcdbc2703eff13be874
BLAKE2b-256 checksum
How to use checksums
227074c5ea7effb37f13de758db49cfd0603ad9922abf047628580232bfd105e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / pythoncms-2.0.0-py3-none-any.whl

Download URL pythoncms-2.0.0-py3-none-any.whl
Size 6.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
db14787cc5bfd73ec008e2f9dfe8d943d6f40da0cf94229a74200469d9d85949
BLAKE2b-256 checksum
How to use checksums
0ae944c06e7edbe955d56694352158352ea1f5ce5ed148e4fff39dbb1507eb89
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.3

2 release files

1.2.2

1 release file

1.2.1

1 release file

1.2.0

1 release file

1.1.0

1 release file

1.0.1

1 release file

1.0.0

1 release file

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page