Skip to main content

Sanhe's Atlassian SDK for Python

Project description

Documentation Status https://github.com/MacHu-GWU/sanhe_atlassian_sdk-project/actions/workflows/main.yml/badge.svg https://codecov.io/gh/MacHu-GWU/sanhe_atlassian_sdk-project/branch/main/graph/badge.svg https://img.shields.io/pypi/v/sanhe-atlassian-sdk.svg https://img.shields.io/pypi/l/sanhe-atlassian-sdk.svg https://img.shields.io/pypi/pyversions/sanhe-atlassian-sdk.svg https://img.shields.io/badge/✍️_Release_History!--None.svg?style=social&logo=github https://img.shields.io/badge/⭐_Star_me_on_GitHub!--None.svg?style=social&logo=github
https://img.shields.io/badge/Link-API-blue.svg https://img.shields.io/badge/Link-Install-blue.svg https://img.shields.io/badge/Link-GitHub-blue.svg https://img.shields.io/badge/Link-Submit_Issue-blue.svg https://img.shields.io/badge/Link-Request_Feature-blue.svg https://img.shields.io/badge/Link-Download-blue.svg

Welcome to sanhe_atlassian_sdk Documentation

https://sanhe-atlassian-sdk.readthedocs.io/en/latest/_static/sanhe_atlassian_sdk-logo.png

sanhe_atlassian_sdk is a lightweight foundational library for interacting with Atlassian REST APIs. It provides a unified HTTP client with both synchronous and asynchronous support, serving as the base layer for product-specific SDKs.

About

This library is designed as a low-level foundation that handles common concerns for Atlassian API interactions:

  • Unified HTTP Client: Built on httpx for modern, high-performance HTTP operations

  • Sync and Async Support: Seamlessly switch between synchronous and asynchronous request patterns based on your application needs

  • Authentication: Built-in HTTP Basic Authentication for Atlassian Cloud APIs

  • Pydantic Integration: Uses Pydantic for robust configuration validation

Product-Specific SDKs: This library serves as the foundation for higher-level SDKs that provide product-specific functionality:

  • sanhe_confluence_sdk - Confluence Cloud API operations (coming soon)

  • sanhe_jira_sdk - Jira Cloud API operations (coming soon)

Usage

from sanhe_atlassian_sdk import Atlassian

# Initialize the client
client = Atlassian(
    url="https://your-domain.atlassian.net",
    username="your-email@example.com",
    password="your-api-token",  # Use API token, not your account password
)

# Use the synchronous client
response = client.sync_client.get(
    f"{client.url}/wiki/api/v2/spaces",
)

# Or use the asynchronous client
async def fetch_spaces():
    response = await client.async_client.get(
        f"{client.url}/wiki/api/v2/spaces",
    )
    return response.json()

Note: For Atlassian Cloud, you should use an API token as the password, not your account password.

Install

sanhe_atlassian_sdk is released on PyPI, so all you need is to:

$ pip install sanhe-atlassian-sdk

To upgrade to latest version:

$ pip install --upgrade sanhe-atlassian-sdk

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

sanhe_atlassian_sdk-0.1.1.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

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

sanhe_atlassian_sdk-0.1.1-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file sanhe_atlassian_sdk-0.1.1.tar.gz.

File metadata

  • Download URL: sanhe_atlassian_sdk-0.1.1.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for sanhe_atlassian_sdk-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6df572e816044a0a95898b585c3d16f0db9c9e72a0ac37c421a4dd3fc859c4cb
MD5 08ad1f8aa3d107a03150735535664c0b
BLAKE2b-256 358f65309ad42fc22d81582800ad7b989d0f8a55200d5be2f4d6b19f15368b5a

See more details on using hashes here.

File details

Details for the file sanhe_atlassian_sdk-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for sanhe_atlassian_sdk-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 85a8a28bd1cdc49ab8b9621234b21e9f8d8399144206581d183fd4a1146687d1
MD5 31191cef913ed0f7fb7f40a4b3fa9f8d
BLAKE2b-256 65f5cbe90194a762ba4724731c7b2efa97359bdda23137f14510fdb1f4787271

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