Skip to main content

Bass

Bass is a static website generator (Bass=Build A Static Site), written in Python 3. It turns a collection of content pages, assets (PNG, CSS, JS etc.) and templates into a static website, i.e. a website consisting only of directories, HTML pages and the same assets. Bass is distributed under the MIT license (see the LICENSE file for more details).

The idea behind a static site generator is that you don't need a content-management system on the server to generate pages dynamically: you generate the content, upload it to the server, and repeat this process when something has changed. That way, there is no need to install complex software on the server, with the associated maintenance effort (software upgrade, backup) and security issues.

The design of Bass borrows ideas from Wok and other static site generators (see overview). Before I created Bass, I used Wok for about a year, created two websites with it, and also looked at alternatives. During that year I noticed several drawbacks, which led to the development of Bass.

The most important feature of Bass is that it gives the user complete freedom in organizing the input directory, considers this organization as meaningful, and therefore preserves it in the site tree. With organization of the input directory I mean: (1) the structure of the tree of files and sub-directories in the input directory, and (2) the names of files and sub-directories. This concept was borrowed from Wintersmith. Other static site generators are designed primarily for blog sites, and use an input directory with a fixed structure, or completely ignore the structure of the input directory, creating the structure of the site tree from metadata (Wok for example).

Other features that were added: extension through generic event mechanism (inspired by Pelican and Wok); use of template engines other than Jinja; ignoring specified files in the content directory (e.g. Emacs backup files); flexible pagination.

Documentation

Documentation is in the doc directory. An example site is in the test directory.

Installation

The recommended way to install Bass is from the Python Package Index with this command: sudo pip install bass.

Dependencies

All dependencies are available through pip. Although optional, you should at least install one of the following three tools:

  • Markdown (Markdown2 is an alternative)
  • Docutils
  • Textile

If you install with pip, Markdown2 will be installed automatically.

Required

  • pyyaml
  • Chameleon

Optional

  • Markdown or Markdown2, for rendering Markdown documents.
  • Docutils, for rendering ReStructuredText documents.
  • Textile, for rendering Textile documents.
  • WebOb, for a more advanced web server.
  • Waitress, for a faster web server.

Usage

To use Bass, go to the project directory (the directory where the input files and generated site will be located), and run the command bass -c or bass --create. This will create a basic directory structure and corresponding configuration file. You can change the names of the directories, provided you apply the changes in the configuration file as well.

Put your content in the input directory (default: input). Build the site with bass -b or bass --build. If you want to see debugging information, use bass -b -d or bass --build --debug.

If you add the option -s or --serve, Bass will generate the site as usual, and then start a simple web server on port 8080. This web server is intended solely for local testing of the site during the development phase.

If the Python package WebOb is available, a slightly more advanced server (WSGI) is made available. This server checks for changes in the input and layout directories (see the manual) whenever a page is requested. If it detects a change in either of these directories, the site is regenerated before the page is returned. If the Python package Waitress is also installed, this WSGI-based server is replaced with a faster one.

About

Bass is written by Nico Poppelier and licensed under the MIT license.

The name is just another acronym. Several other site generators (e.g. Wok, Wintersmith, Jekyll, Pelican, StrangeCase) inspired this project.

Metadata

Release files for bass 1.4.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 bass 1.4.0
File Size Uploaded Provenance
bass-1.4.0.tar.gz 19.2 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 38.6 kB

Release files / bass-1.4.0.tar.gz

Download URL bass-1.4.0.tar.gz
Size 19.2 kB
Tags Source
SHA-256 checksum
How to use checksums
aee3c014c26246e72789a0c8d442b88ccae359312039cc09f4618833aabbf760
BLAKE2b-256 checksum
How to use checksums
121993a241944fa3faa24c7a819c6706a76dd7ac26c0e55f19933ce7fee67c83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / bass-1.4.0-py3-none-any.whl

Download URL bass-1.4.0-py3-none-any.whl
Size 19.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e33649ca17da43c1328239cd5f395581bcad1921e9f7dcd5e05f14f4f0470dea
BLAKE2b-256 checksum
How to use checksums
ecf2eb765c7f170edf03d54cb344b312f3ff076d867b29dc643828ef4084c506
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for bass 1.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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