Skip to main content

Standalone SVG/PNG banknote generation helpers.

Project description

lunamint

Standalone SVG/PNG banknote generation helpers.

Install

pip install lunamint

Gradio UI + API (optional)

pip install lunamint[gradio]
python -m lunamint.app.gradio_app

Gradio will print a local URL. The same app exposes a JSON API endpoint:

POST /run/predict
Content-Type: application/json

{
    "data": [
        "Ling Treasury",
        10,
        "./portraits/portrait_ling.png",
        "灵国国库",
        "天圆地方",
        160.0,
        60.0,
        300.0,
        ""
    ]
}

Response includes paths for front_png and back_png plus metadata.

Usage

from lunamint import generate_banknote_pair_svgs_pngs

result = generate_banknote_pair_svgs_pngs(
    name="Ling Treasury",
    denom=10,
    portrait_path="./portraits/portrait_ling.png",
    output_dir="./out/10",
)

print(result["front_svg"], result["back_svg"])

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

lunamint-0.1.2.tar.gz (116.2 kB view details)

Uploaded Source

Built Distribution

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

lunamint-0.1.2-py3-none-any.whl (140.5 kB view details)

Uploaded Python 3

File details

Details for the file lunamint-0.1.2.tar.gz.

File metadata

  • Download URL: lunamint-0.1.2.tar.gz
  • Upload date:
  • Size: 116.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for lunamint-0.1.2.tar.gz
Algorithm Hash digest
SHA256 82a08a76a296e5459bd7a38e3bf86abceefd15a8f493010b17eac53e1ea61c2d
MD5 d789b0bcf8a95a4a77ed42f062da67e6
BLAKE2b-256 fa1bc418101b742341cee9807c7f20e67459b78fd647af736e13f1a97aa99ef8

See more details on using hashes here.

File details

Details for the file lunamint-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: lunamint-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 140.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for lunamint-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 daa5cfa4bff4ea44130454b2558f6974d38406988d265218f66f12d1616e3db1
MD5 597bcdc14dcc22822ba0c767119c0b67
BLAKE2b-256 eda0f30d97b9adc3debbd7c23d84ab2487aa4ed15c0e5fb441a672963c70c158

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