Skip to main content

Parkitect Blueprint Reader

Python API and CLI tool to read Parkitect's blueprints metadata.

Python versions Version License

PyPI - Documentation - Source code - Issue tracker - Changelog

Prerequisites

  • Python >= 3.10

Installation

From PyPi

pip install parkitect-blueprint-reader

Locally

After cloning/downloading the repo:

pip install .

Usage

API

The API consists of one load() method, which reads blueprint metadata from the given binary file-like object and returns the parsed data as a dictionary.

import parkitect_blueprint_reader
from pprint import pprint

try:
    with open('coaster.png', 'rb') as fp: # Note it's opened in binary mode
        pprint(
            parkitect_blueprint_reader.load(fp)
        )
except Exception as e:
    print(e)

CLI

The CLI reads metadata from the given blueprint filename, then writes the parsed data as a JSON to stdout.

parkitect-blueprint-reader coaster.png

The --pretty option may be used to pretty-print the outputted JSON.

Data format

Data is stored in blueprints as follows, using the least significant bits steganography technique (described in the reference documents below):

  • A three-bytes magic number: SM\x01 (Parkitect's main developer initials)
  • Size (little-endian unsigned int), in bytes, of the gzippped content to be read
  • A 16-bytes MD5 checksum
  • The actual gzippped data, which is Size bytes long

References

Development

Getting source code and installing the package with dev dependencies

  1. Clone the repository
  2. From the root directory, run: pip install -e ".[dev]"

Releasing the package

From the root directory, run python setup.py upload. This will build the package, create a git tag and publish on PyPI.

__version__ in parkitect_blueprint_reader/__version__.py must be updated beforehand. It should adhere to Semantic Versioning.

An associated GitHub release must be created following the Keep a Changelog format.

Metadata

Release files for parkitect-blueprint-reader 1.1.2

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

Source distribution (sdist)

Source distribution for parkitect-blueprint-reader 1.1.2
File Size Uploaded Provenance Actions
parkitect_blueprint_reader-1.1.2.tar.gz 6.3 kB Without provenance Details for parkitect_blueprint_reader-1.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for parkitect-blueprint-reader 1.1.2
File Interpreter ABI Platform Actions
parkitect_blueprint_reader-1.1.2-py3-none-any.whl Python 3 none any Details for parkitect_blueprint_reader-1.1.2-py3-none-any.whl

Total release size: 12.8 kB

Release files / parkitect_blueprint_reader-1.1.2.tar.gz

Download URL parkitect_blueprint_reader-1.1.2.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8a1586f84d18f5d8939b95493b85ff4cb77c380e873294245e500b93fb57358c
BLAKE2b-256 checksum
How to use checksums
ed5005f994e84a96cbba432b1f8bcb54d47f03d1585eab3766a59941004ddc58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.10

Release files / parkitect_blueprint_reader-1.1.2-py3-none-any.whl

Download URL parkitect_blueprint_reader-1.1.2-py3-none-any.whl
Size 6.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
afe5e720fddae56425ec519a9db85ce24211343be825639b6ae72719a968a47f
BLAKE2b-256 checksum
How to use checksums
dc01ed8f96dc1ea90ef0af3027510da63ae698e847c52e58f28dff2edeb68793
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.10

Security for parkitect-blueprint-reader 1.1.2

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