Skip to content

paulocoutinhox/kaktos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

130 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Kaktos Logo

Python Static Site Generator for Serverless Applications ๐Ÿš€


ฮบฮฌฮบฯ„ฮฟฯ‚ - Kaktos

Kaktos

Kaktos is a powerful Python Static Site Generator designed to create highly efficient serverless applications. Why pay for hosting when you can deploy a completely static site for free?

Create beautiful static websites, e-commerce stores, blogs, landing pages, and sales pages with advanced pagination and dynamic features, all without the hassle of server-side dependencies! ๐Ÿ’ป

โœจ Features

  • Static Website Generator โ€“ Create responsive, fast, and secure static sites ๐Ÿ–ผ๏ธ
  • Static E-commerce โ€“ Build fully functioning static shopping websites ๐Ÿ›’
  • Static Blog โ€“ Advanced blog with pagination and dynamic content ๐Ÿ“
  • Landing Pages & Sales Pages โ€“ Perfect for creating high-conversion pages for any purpose ๐Ÿ›๏ธ
  • Easy to Use โ€“ Intuitive design that requires no server-side programming ๐Ÿ’ก
  • Serverless โ€“ Deploy to platforms like Netlify, Cloudflare, or Render with no need for server management โ˜๏ธ
  • Many Free Hosting Options โ€“ Many companies offer free hosting for static sites, as no server-side processing is required ๐ŸŒ
  • Fast & Secure โ€“ Static sites are inherently faster and more secure โšก
  • No Hosting Fees โ€“ Fully serverless deployment means no hosting costs ๐Ÿ†“
  • SEO Optimized โ€“ Generate clean, SEO-friendly pages ๐Ÿ•ต๏ธโ€โ™‚๏ธ
  • Customizable Templates โ€“ Based on the powerful Jinja2 templating engine ๐ŸŽจ

๐Ÿค” Why Kaktos?

With Kaktos, you can deploy your website without worrying about server management, database configuration, or paying for hosting. Focus on your content, and let Kaktos handle the rest. Enjoy the benefits of a serverless architecture, which has become a major trend in web development, reducing operational costs and simplifying the deployment process for companies of all sizes.

  • No need to manage infrastructure
  • No ongoing hosting fees
  • Scalable and fast deployment
  • Ideal for websites, blogs, e-commerce, and landing pages

๐Ÿ”„ All-in-One Solution

Unlike most static site generators, which focus on specific tasks, Kaktos provides an all-in-one solution.

Whether you need to build a blog, an e-commerce store, a landing page, or any other static website, Kaktos brings it all together in one platform, simplifying your workflow and allowing you to manage everything in a single place.

๐ŸŽฌ Demo

Cloudflare:

https://kaktos.pages.dev

Netlify:

https://kaktos.netlify.app

Amplify:

https://main.d27ze19drzixy0.amplifyapp.com

Render:

https://kaktos.onrender.com

Requirements

  • Python 3.9+

๐Ÿš€ How to Get Started

Installation

Option 1: Using Virtual Environment (Recommended)

Using a virtual environment is the recommended approach as it keeps your project dependencies isolated from your system Python installation.

  1. Create a virtual environment:
python3 -m venv venv
  1. Activate the virtual environment:

    • On macOS/Linux:
    source venv/bin/activate
    • On Windows:
    venv\Scripts\activate
  2. Install dependencies:

pip install -r requirements.txt
  1. Deactivate the virtual environment (when you're done working):
deactivate

Option 2: Direct Installation

If you prefer to install dependencies directly to your system Python:

python3 -m pip install -r requirements.txt

Note: It's recommended to use a virtual environment (Option 1) to avoid conflicts with other Python projects.

๐Ÿ’ป Development

To work in development mode, you only need execute one command:

python3 kaktos.py

When you change any file locally, the server will process it again and auto-refresh on browser.

This command always force use development mode, with or without environment variable.

๐Ÿญ Production

To generate production files, you only need execute one command:

python3 kaktos.py build

All files will be generated in build folder.

If you set environment variable KAKTOS_DEBUG=True, kaktos will build all files for development mode, example:

KAKTOS_DEBUG=True python3 kaktos.py build

If you want start a web server to test files inside build folder use:

python3 kaktos.py serve

๐Ÿ“ฆ Deploying with One Click

Netlify:

Deploy to Netlify

Render:

Deploy to Render

๐Ÿ—๏ธ Project Structure

  • kaktos.py = main file that process your command
  • requirements.txt = python dependency list
  • templates/layouts = folder for all layouts that pages can inherit
  • templates/pages = folder for pages that will be generated
  • templates/shared = folder for parts of layouts that can be shared with other layouts
  • modules = kaktos modules
  • modules/config.py = configuration file
  • files = folder that contains all assets and custom files
  • extras/config = folder that contains some configurations for dynamic sample data

๐Ÿ”ง Commands

Each command supported by Kaktos is a Python file located in the modules/commands/ folder.

To add new commands, simply create a new Python file in the modules/commands/ folder and implement the def run(params={}) method within it.

๐Ÿ“ Templates

All templates (html files) are based on Jinja2 library. You can see it here:

https://jinja.palletsprojects.com/en/stable/

๐Ÿ› ๏ธ Troubleshooting

โ€ข Python version

Each service that build the static content automatically use a specific python version.

If you need change the python version used to build all files and pages, edit file .python-runtime and change to 3.13 or other.

These services that im using have this python version:

โ€ข Template changed, but not reloaded

Invalid Jinja2 syntax can prevent your HTML template from being built.

Check your terminal to see the error message, the HTML file and the line number where invalid syntax was detected.

โ˜• Buy Me a Coffee

Buy Me a Coffee at ko-fi.com

๐Ÿ–ผ๏ธ Images

All images for demo i got from:

https://unsplash.com/

๐Ÿ“œ License

MIT

Copyright (c) 2021-2026, Paulo Coutinho

About

Kaktos is a Python Static Site Generator for Serverless Applications ๐Ÿš€

Topics

Resources

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

 
 
 

Contributors

โšก