Skip to main content

Scanye Python Library and CLI

A Python library and CLI tool for interacting with the Scanye API.

Unofficial project. This library is not created, maintained, sponsored, or endorsed by Scanye. It's a community-built client for the unofficial Scanye API (api.scanye.pl), reverse-engineered from the Scanye web app's network traffic. Use at your own risk.

Features

  • Login and authentication
  • List sales and purchase invoices
  • Show a single invoice's details and history
  • Filter invoices by KSeF status
  • Send invoices to KSeF
  • E-mail invoices to buyers
  • Download invoices as PDF
  • CLI for easy access

Installation

pip install scanye-py

CLI Usage

First, login to your account:

scanye login --email your@email.com

List your sales invoices:

scanye invoices list --type sales

List purchase invoices that are not yet sent to KSeF:

scanye invoices list --type purchase --unsent

Show a single invoice's details and history:

scanye invoices show <invoice-id>

Download all sales and purchase invoices from a given month as PDF (multiple invoices are downloaded as a single ZIP and extracted automatically):

scanye invoices download --type sales --month 2026-07 -o ./invoices/2026-07/sales
scanye invoices download --type purchase --month 2026-07 -o ./invoices/2026-07/purchase

Download a single invoice by ID:

scanye invoices download <invoice-id> -o ./invoices

E-mail an invoice to its buyer:

scanye invoices send-email <invoice-id> --to buyer@example.com

Shell completion

The CLI is built on click, which provides tab-completion of commands, options, and choice values (e.g. --type <TAB>) for free. To enable it in bash, add this to your ~/.bashrc:

eval "$(_SCANYE_COMPLETE=bash_source scanye)"

(zsh and fish are supported too — see click's shell completion docs for the equivalent line.) Open a new terminal afterwards for it to take effect.

Library Usage

from scanye.client import ScanyeClient

client = ScanyeClient()
client.login("your@email.com", "your_password")

invoices = client.fetch_invoices(is_sales=True)
for inv in invoices:
    print(f"{inv.invoice_no}: {inv.ksef_status}")

Download files

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

Source Distribution

scanye_py-0.2.4.tar.gz (20.3 kB view details)

Uploaded Source

Built Distribution

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

scanye_py-0.2.4-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

Details for the file scanye_py-0.2.4.tar.gz.

File metadata

  • Download URL: scanye_py-0.2.4.tar.gz
  • Upload date:
  • Size: 20.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for scanye_py-0.2.4.tar.gz
Algorithm Hash digest
SHA256 59187ee8bd43ead48f076d46eff58b5ce0c6292a38cedca26874e15c21fbc2f2
MD5 9fef95742f1c448f9d646ac350784f7e
BLAKE2b-256 b2e8b0504d368d3f5c72aa232221e40acb998e9b91a08ab7e05bcb184171391f

See more details on using hashes here.

Provenance

The following attestation bundles were made for scanye_py-0.2.4.tar.gz:

Publisher: ci.yml on theundefined/scanye-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scanye_py-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: scanye_py-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 14.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for scanye_py-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 bc3f2c7eeac0a90a198df3e67820d9c6df255d762cd882ee6ebaf3cc2cf617fb
MD5 87d7b9140d9adafcd60572de2ff1caf4
BLAKE2b-256 8691a1eb7f9e457ad7e69b98be6ea61a84ffa7206759a31d8586ba87ea62f381

See more details on using hashes here.

Provenance

The following attestation bundles were made for scanye_py-0.2.4-py3-none-any.whl:

Publisher: ci.yml on theundefined/scanye-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.4 This release

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 files

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