Skip to main content

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

Project description

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.

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

parkitect_blueprint_reader-1.0.0.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

parkitect_blueprint_reader-1.0.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file parkitect_blueprint_reader-1.0.0.tar.gz.

File metadata

File hashes

Hashes for parkitect_blueprint_reader-1.0.0.tar.gz
Algorithm Hash digest
SHA256 7ebdb118fc4a27dc80c46dd7675ae911fdc18401ba22fe8d90a3e6f1e799e011
MD5 7e38e248c4edfc3c08333bfd9c2df2a2
BLAKE2b-256 4662454280414ff876673c685c1e71f19e2f589f4e99ffc352c5ee861ea08ee2

See more details on using hashes here.

File details

Details for the file parkitect_blueprint_reader-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for parkitect_blueprint_reader-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0eb667df068fc8a91a31732cc63f0d3589130eea4831a50c57ebaffb33646297
MD5 51cd9a3559b9d652b4980c3c7ae7ca17
BLAKE2b-256 039512e862087226dbceb9b8e40d8feb10909606ac7e1161987250730ec5ee5f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page