Skip to main content

A Python package for automating E-BIR forms

Project description

ebir-automation

A Python package for robust automation of the eBIRForms application on Windows, powered by Rust, PyO3, and UIAutomation.

Features

  • Launches or focuses the eBIRForms application (including mshta.exe child windows)
  • Waits for the application to be fully loaded before proceeding
  • Snaps the window to the left half of the screen (Windows 11 supported)
  • Reliable window and element polling (no fixed sleeps)
  • Python bindings via PyO3
  • Automate TIN entry, form selection, and more

Installation

Install via pip:

pip install ebir-automation

Usage

Basic Example

from ebir_automation import auto_open_ebir_window, EBirformsAutomation

# Launch or focus eBIRForms, snap window (default: use_winapi=True, ebir_path=None)
hwnd = auto_open_ebir_window(True, None)
if hwnd is None:
    raise RuntimeError("Failed to open eBIRForms window")

handle = EBirformsAutomation(hwnd)
handle.type_tin("123", "456", "789", "000")
successful = handle.select_form("1701v2018", fill_up=True)
print("Form selection successful:", successful)

Running the Quick Test Script

A quick test/demo script is provided:

python -m ebir_automation.quicktest

This will launch eBIRForms, enter a sample TIN, and select a form, printing the result.

API Reference

  • auto_open_ebir_window(use_winapi: bool = True, ebir_path: Optional[str] = None) -> int | None
    • Launch or focus the eBIRForms application and return its window handle, or None on failure.
  • class EBirformsAutomation(hwnd: int)
    • .type_tin(tin1: str, tin2: str, tin3: str, tin4: str) -> None
    • .select_form(form: str, fill_up: bool) -> bool

Error Handling

All functions raise RuntimeError on failure (e.g., if the eBIRForms window is not found or an element is missing).

Project Links

License

MIT

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

ebir_automation-0.4.0.tar.gz (25.9 kB view details)

Uploaded Source

Built Distribution

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

ebir_automation-0.4.0-cp38-abi3-win_amd64.whl (247.6 kB view details)

Uploaded CPython 3.8+Windows x86-64

File details

Details for the file ebir_automation-0.4.0.tar.gz.

File metadata

  • Download URL: ebir_automation-0.4.0.tar.gz
  • Upload date:
  • Size: 25.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.3

File hashes

Hashes for ebir_automation-0.4.0.tar.gz
Algorithm Hash digest
SHA256 eef57d377df5b984784618d9d3b655b9dcd33f3f6df69f3320881cd672611046
MD5 bec1bede3d6e9cb696f2944ff4329b2f
BLAKE2b-256 e889c92d444eecbe35ecd145e7103f5846e6f728e1d9c0b1bba5c7ec00008898

See more details on using hashes here.

File details

Details for the file ebir_automation-0.4.0-cp38-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for ebir_automation-0.4.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 5133e3402a9489c6b4b35f0172d7a962bc8b35e764afc3dab100ef8c0ee8ad9a
MD5 f6c461f50404599f4fec96eeae004fd4
BLAKE2b-256 739e80473b60bffd355f883e8cca2cc89edaa31d49cc7d06ccee6d3168d09061

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