Skip to content

gava-connect-plus v0.4.0

Choose a tag to compare

@IamMuuo IamMuuo released this 16 Jul 06:13
Immutable release. Only release title and notes can be modified.

What's New

  • Added Automated NIL Return Filing (iTax_NIL_Return) — file a NIL return for a taxpayer with an active obligation but no taxable income in the period, straight from Python:
  from gavaconnect import GavaConnectSync
  from gavaconnect.exceptions import NilReturnValidationError

  credentials = {
      "consumer_key": "your_nil_return_app_consumer_key",
      "consumer_secret": "your_nil_return_app_consumer_secret",
  }

  with GavaConnectSync(environment="sandbox", nil_return=credentials) as gava:
      try:
          result = gava.nil_return.file(
              pin="A521040203F",
              obligation_code="1",  # Income Tax - Individual Resident
              month="12",
              year="2016",
          )
          print(f"Filed successfully. Acknowledgment No: {result.ack_number}")

      except NilReturnValidationError as e:
          print(f"KRA rejected the filing: {e}")

Prefer async? Swap GavaConnectSync for GavaConnect and await gava.nil_return.file(...) inside an async with block — same call signature either way.

  • New isolated nil_return credential scope: export KRA_NIL_RETURN_KEY /
    KRA_NIL_RETURN_SECRET, or pass them via the nil_return={...} config dict.

What's Changed

Full Changelog: v0.3.0...v0.4.0