Skip to main content

Requests wrapper for Azure DevOps

Project description

Azure requests

Just a wrapper around Python requests module for communicating with Azure DevOps.

DRY (don't repeat yourself) features

  • Authentication
  • Replace organization, project, and team in URL, so URLs can be copy-pasted from the documentation
  • Handle rate limit
  • Handle ADO temporary server errors
  • Set appropriate Content-Type headers
  • Parse JSON automatically
  • Raise exception for wrong HTTPS statuses

Rationale

Azure DevOps has an excellent HTTPS API with an excellent documentation. It is easy to understand and easy to use. For smaller scripts and projects it is easier to use them as is. Every existing API implementations have many documentation issues.

Example

from azure_requests import AzureRequests

azure_requests = AzureRequests(
    pat="<YOUR PAT>",
    organization="<YOUR ORGANIZATION>",
)

work_item = azure_requests.api(
    # Copy-pasted from https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/work-items/get-work-item?view=azure-devops-rest-7.0&tabs=HTTP
    "GET https://dev.azure.com/{organization}/{project}/_apis/wit/workitems/{id}?api-version=7.0",
    # custom URL parameters
    id=12345,
).request()

print(work_item)

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

azure_requests-23.3.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

azure_requests-23.3-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file azure_requests-23.3.tar.gz.

File metadata

  • Download URL: azure_requests-23.3.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for azure_requests-23.3.tar.gz
Algorithm Hash digest
SHA256 f00d40d47810a03b97a183284fdac5cab127a7503b345a98f9e36b314c90b496
MD5 96424e7446cce0a6b989bf228f0829bd
BLAKE2b-256 02cda17f414074188892b5fcb12acc27889bd0355c683d8b36457b78e079c3c1

See more details on using hashes here.

File details

Details for the file azure_requests-23.3-py3-none-any.whl.

File metadata

File hashes

Hashes for azure_requests-23.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ae37024c3a48b9a5cafacf716065a0cb6bb36f8ebb233260b1b4450749308dbf
MD5 c2a71bd666edfe8522eaabc53648f336
BLAKE2b-256 2be8d8d99a0b89d3309d4155b87ab050b83e5b900ec4e1fd9968b95e3415f80d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page