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.3.tar.gz (140.8 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.3-py3-none-any.whl (166.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for lunamint-0.1.3.tar.gz
Algorithm Hash digest
SHA256 d287a17fe0d7bcb8970999dd6cd255010d6dd3ce4e80d1924d0409131f2f9a76
MD5 26fdd8c37c35527b921933a229f626c5
BLAKE2b-256 e46371c05c002b9d0e1f084684ceb3bd6f0fa1caed4a9209958cad0690112437

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for lunamint-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4bf137b35d29c2144d41a1b6a55de7f806b5492fe24c65bf9a79f1cf3ed6de95
MD5 484af72e1b172a64877d2a0c18d9733e
BLAKE2b-256 ece98706e33465d45bfd7b9d3e70f65b532c27c8721c74a9e52f4a47cd0b6ab2

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