ishelf-ee — InvoiceShelf Expense Exporter
Export a client's expenses from a self-hosted InvoiceShelf (2.4.1) instance to CSV,
and bundle their receipts into a zip. Zero runtime dependencies (Python standard
library only). Installs the ee command.
Install
pip install ishelf-ee
Requires Python 3.8+. Or run from a clone without installing:
python3 -m ishelf_ee --client "Acme Corp" --start 01042025 --end 30062025
# or the legacy shim:
python3 export_expenses.py --client "Acme Corp" --start 01042025 --end 30062025
Configure
The tool needs your instance URL and login. Provide them either as environment variables or in a config file. Never commit or share your filled-in config — it holds your password.
Required: INVOICESHELF_URL, INVOICESHELF_EMAIL, INVOICESHELF_PASSWORD.
Optional: INVOICESHELF_COMPANY_ID (default 1; or use --company),
INVOICESHELF_USER_AGENT (see Troubleshooting).
Option A — environment variables (work from any directory)
export INVOICESHELF_URL=https://invoices.example.com
export INVOICESHELF_EMAIL=you@example.com
export INVOICESHELF_PASSWORD=your-password
Option B — a config file
Copy the template and fill it in:
mkdir -p ~/.config/ishelf-ee
curl -o ~/.config/ishelf-ee/config.env \
https://raw.githubusercontent.com/<you>/ishelf-ee/main/config.env.example
# then edit ~/.config/ishelf-ee/config.env
The config file is discovered in this order (first match wins):
--config PATH(explicit)$INVOICESHELF_CONFIG./config.env(current directory)~/.config/ishelf-ee/config.env← recommended for the installedeecommand~/.ishelf-ee.env
Environment variables always override file values.
Usage
ee --client "Acme Corp" --start 01042025 --end 30062025
ee --company "My Company" --client "Acme Corp" --start 01042025 --end 30062025
ee --customer-id 12 --start 01042025 --end 30062025 --out ./exports
ee --client "Acme Corp" --start 01042025 --end 30062025 --dry-run
Dates are DDMMYYYY, inclusive. Outputs <Client>_<start>-<end>.csv and
<Client>_<start>-<end>_receipts.zip into --out (default exports/). Use
--dry-run to see what would be exported without downloading or writing anything.
Choosing the company
If you run more than one company in InvoiceShelf, pass --company "Name" to scope
the export; the name is resolved to its id (case-insensitive, exact match preferred).
--company overrides INVOICESHELF_COMPANY_ID. On an ambiguous or unknown name, the
tool lists the available companies as id — name so you can pick.
Troubleshooting
Cloudflare "Error 1010: Access denied" / HTTP 403 on login. The instance is behind Cloudflare, which bans the default Python User-Agent. The tool already sends a browser User-Agent. If your Cloudflare config still blocks it, override it:
INVOICESHELF_USER_AGENT="Mozilla/5.0 (...)" ee ...
If it persists, allowlist your own access in the Cloudflare dashboard (e.g. a WAF
skip rule for the /api/* path, or turn off Bot Fight Mode for the API) — it is
your own site.
Develop / test
python3 -m unittest discover -s tests -v
Releasing
Publishing to PyPI is automated via GitHub Actions (.github/workflows/publish-to-pypi.yaml)
using PyPI Trusted Publishing — no API token is stored. To cut a release:
-
Bump
versioninpyproject.toml(must match the tag below). -
Commit, then tag and push:
git tag v0.1.0 git push origin main --tags
The workflow builds and publishes the tagged version. A one-time Trusted Publisher
must be configured on PyPI for the ishelf-ee project (owner argoyal, repo
ishelf-ee, workflow publish-to-pypi.yaml).
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ishelf_ee-0.1.0.tar.gz.
File metadata
- Download URL: ishelf_ee-0.1.0.tar.gz
- Upload date:
- Size: 12.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00547c167c54914981e8411e0ceefd6f80bbcc53dd98c7a41ba3df5a5bc649cc
|
|
| MD5 |
ffb4d9254b6f542fbee7df236011695c
|
|
| BLAKE2b-256 |
295e484baf977010ef8af4b6afc255eb49ebf25b31612aa23191382b21169721
|
Provenance
The following attestation bundles were made for ishelf_ee-0.1.0.tar.gz:
Publisher:
publish-to-pypi.yaml on argoyal/ishelf-ee
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ishelf_ee-0.1.0.tar.gz -
Subject digest:
00547c167c54914981e8411e0ceefd6f80bbcc53dd98c7a41ba3df5a5bc649cc - Sigstore transparency entry: 2310432906
- Sigstore integration time:
-
Permalink:
argoyal/ishelf-ee@3e7973a0ea1994b3d97dab77d1cfa23c6d293956 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/argoyal
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yaml@3e7973a0ea1994b3d97dab77d1cfa23c6d293956 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ishelf_ee-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ishelf_ee-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ab202daa93e10c3908cb72e1955e4d59ff3491c9b55a6cb1306fb58beda81fd
|
|
| MD5 |
469a271fd627a9c3fd32d108af4621f9
|
|
| BLAKE2b-256 |
e27ae8ec4f1dc141d73e4b9a9fc1c426fdf53bd93ab00945ca414db1dff28973
|
Provenance
The following attestation bundles were made for ishelf_ee-0.1.0-py3-none-any.whl:
Publisher:
publish-to-pypi.yaml on argoyal/ishelf-ee
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ishelf_ee-0.1.0-py3-none-any.whl -
Subject digest:
6ab202daa93e10c3908cb72e1955e4d59ff3491c9b55a6cb1306fb58beda81fd - Sigstore transparency entry: 2310432916
- Sigstore integration time:
-
Permalink:
argoyal/ishelf-ee@3e7973a0ea1994b3d97dab77d1cfa23c6d293956 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/argoyal
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yaml@3e7973a0ea1994b3d97dab77d1cfa23c6d293956 -
Trigger Event:
push
-
Statement type: