Skip to main content

justic - just static

Let me explain what was inside my head as I start this:

There are a bunch of templates that defined some basic views, like a list-view, a card-view or some grid-view. And the content files will be in another folder. Every file contains some data and define the template for the render. The structure of the files will be the structure of the output html files.

And there it is. Still under development!

Install

pip install justic

Example

python -m justic example
python -m http.server --directory example/build

Content files

The content are simple python files with a specific structure. There are three important sections:

JUSTIC (__JUSTIC__)

For settings for the Justic class. This will be inherited to the sub directory.

META (__META__)

Parameters for the current instance, like the template name or build file.

OTHERS

All other capitalized variable will be passed to the template.

All Parameters:

__JUSTIC__ = {
  'remove_build_prefix': 'content',
  'default_template': 'index.html',
}

__META__ = {
  'target': 'content',
  'targets': ['content'],
  'static': 'static',
  'template': 'foo.html',
}

TITLE = 'Foo'
SITEURL = ''

Development

Virtual environment windows:

python -m venv venv
venv\Scripts\activate

Virtual environment linux:

python3 -m venv venv
source venv/bin/activate

Setup project:

python -m pip install --upgrade pip wheel setuptools coverage pytest flake8 pylint tox
python -m pip install -e .

Run single test with code coverage:

coverage run --source=justic -m pytest
coverage report -m

Run test for multiple python versions:

tox -p auto

Check syntax:

python -m flake8 justic
python -m pylint --rcfile=setup.cfg justic

Create package Jenkins will do it:

git tag -a 0.1.7 -m "version 0.1.7"
git push --follow-tags

No Jenkins?:

python -m pip install --upgrade twine
python setup.py sdist bdist_wheel
python -m twine check dist/*
python -m twine upload dist/*

ToDo

  1. copy static don’t work for sub directory

  2. improve test

Metadata

Release files for justic 1.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 justic 1.0.0
File Size Uploaded Provenance
justic-1.0.0.tar.gz 58.2 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 63.6 kB

Release files / justic-1.0.0.tar.gz

Download URL justic-1.0.0.tar.gz
Size 58.2 kB
Tags Source
SHA-256 checksum
How to use checksums
fdcad2f45c078eee7280c9d3b43019e4167b7ae63c8e8502f019e6e9e6be36ea
BLAKE2b-256 checksum
How to use checksums
e01cd2c9bed9e110bc72edc540fb2a6610567224e4f051cffdb577a8906c299d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1

Release files / justic-1.0.0-py3-none-any.whl

Download URL justic-1.0.0-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a49fd3a6f476cd86326e89098297a2826c442162c3edd44cc77b7601fae9d9e2
BLAKE2b-256 checksum
How to use checksums
18f07471356aa7d9fa8b405ee6f60d52f5da037c8f93d6db5313fbccbb5bed4a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1

Security for justic 1.0.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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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