HMRC API client
hmrclib
AvailableMaking Tax Digital, Customs an the ither HMRC APIs, cried frae typed Python.
A Python client fer the 73 REST APIs that HMRC publishes on its Developer Hub, includin Making Tax Digital fer 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 haes its ain method. It haundles OAuth2 fer 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 through Making Tax Digital or caws 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 daes
-
Generated frae HMRC’s specifications
The clients an models are generated frae the OpenAPI files HMRC publishes, which are kept in the repository.
-
OAuth2 fer baith kinds o API
Client credentials fer application-restricted APIs, an an authorisation code wi refresh fer user-restricted ones.
-
Strict typing
The package passes mypy in strict mode, an each response is a pydantic v2 model.
Documentation an access details is on the product site, github.com/rodmena-limited/hmrclib. For a pilot, an integration or procurement questions, contact us.