HMRC API client
hmrclib
AvailableMaking Tax Digital, Customs an the ither HMRC APIs, cried frae typed Python.
A Python client for the 73 REST APIs that HMRC publishes on its Developer Hub, includin Making Tax Digital for VAT an Self Assessment, Customs an Lifetime ISA. The client classes an pydantic v2 models are generated frae HMRC’s ain OpenAPI specifications, an ilka endpoint has its ain method. It handles OAuth2 for application-restricted an user-restricted APIs, an an optional FastAPI server receives the browser redirect. hmrclib is no affiliated wi HMRC.
Wha it is for. Python teams biggin tax, payroll or accoontin saftware that files throu Making Tax Digital or cried HMRC’s ither APIs.
- Status
- Available
- Pairt o
- Open soorce
- Licence
- Open source, MIT
- Product site
- github.com/rodmena-limited/hmrclib
- Tags
- PythonHMRCMaking Tax DigitalOAuth2pydantic
Whit it dis
-
Generated frae HMRC’s specifications
The clients an models are generated frae the OpenAPI files HMRC furthets, whilk are keepit in the repository.
-
OAuth2 for baith kinds o API
Client credentials for application-restricted APIs, an an authorisation code wi refresh for user-restricted ones.
-
Strict typing
The package passes mypy in strict mode, an ilka response is a pydantic v2 model.
Documentation and access details are on the product site, github.com/rodmena-limited/hmrclib. For a pilot, an integration or procurement questions, contact us.