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.0.tar.gz (108.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.0-py3-none-any.whl (133.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lunamint-0.1.0.tar.gz
  • Upload date:
  • Size: 108.8 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.0.tar.gz
Algorithm Hash digest
SHA256 bce436fac50a458002a3124db694d65e7976bbb5e0dbe79029807217ce9bdbe9
MD5 3db819452be909acb7aa00ccf59b4cda
BLAKE2b-256 6ef20c735e0bc553ef54380f7f1ac599f5779f7e5b8cdd27004aafcf15a9e515

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lunamint-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 133.0 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9de2662ea29a21d4a9475203ae742d0bb0ecf99977c81ca33ef31f025eee10d2
MD5 231cdbba64e7df83bd45f10e4ec6eb84
BLAKE2b-256 9947566a1074d8550f487dcbed1e9698836a032579e5bbc6533565e9f32446d0

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