shopify-partners-sdk


Nameshopify-partners-sdk JSON
Version 0.1.2 PyPI version JSON
download
home_pageNone
SummaryModern Python GraphQL SDK for Shopify Partners API
upload_time2025-09-14 21:42:49
maintainerAmit Ray
docs_urlNone
authorAmit Ray
requires_python<4.0,>=3.9
licenseMIT
keywords shopify partners graphql sdk api apps
VCS
bugtrack_url
requirements requests pydantic pydantic-settings typing-extensions
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Shopify Partners SDK

[![PyPI version](https://badge.fury.io/py/shopify-partners-sdk.svg)](https://badge.fury.io/py/shopify-partners-sdk)
[![Python Support](https://img.shields.io/pypi/pyversions/shopify-partners-sdk.svg)](https://pypi.org/project/shopify-partners-sdk/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

**Modern Python SDK for Shopify Partners API** - Comprehensive GraphQL client with type safety, automatic pagination, and dual query approaches (raw GraphQL + dynamic FieldSelector). Built for developers who want powerful functionality without complex abstractions.

## 🚀 Key Features

### 🎯 **Dual Query Approaches**
- **Raw GraphQL** - Execute queries directly with full control
- **Dynamic FieldSelector** - Build queries programmatically with type safety

### 🛡️ **Production-Ready**
- **Type Safety** - Full type hints throughout the codebase
- **Automatic Pagination** - Built-in cursor-based pagination support
- **Intelligent Rate Limiting** - Exponential backoff with retry logic
- **Comprehensive Error Handling** - Detailed GraphQL and HTTP error messages

### 🚀 **Developer Experience**
- **Zero Complex Abstractions** - Direct GraphQL access with minimal overhead
- **Synchronous API** - Simple, intuitive Python interface
- **Extensible Architecture** - Easy to extend with custom field selections
- **Rich Documentation** - Comprehensive examples and API reference

## 📦 Installation

### Using pip

```bash
pip install shopify-partners-sdk
```

### Using Poetry

```bash
poetry add shopify-partners-sdk
```

### Development Installation

```bash
# Clone the repository
git clone https://github.com/amitray007/shopify-partners-sdk.git
cd shopify-partners-sdk

# Install with Poetry
poetry install

# Or with pip in development mode
pip install -e .
```

## ⚡ Quick Start

### 1. Get Your Credentials

Get your credentials from the [Shopify Partners Dashboard](https://partners.shopify.com/):
1. **Settings** → **API credentials**
2. Create or select an API credential
3. Copy your **Organization ID** and **Access Token** (starts with `prtapi_`)

### 2. Choose Your Approach

The SDK provides two ways to interact with the Shopify Partners API:

#### 🎯 Option 1: FieldSelector (Recommended)

```python
from shopify_partners_sdk import ShopifyPartnersClient, FieldSelector

# Initialize the client
client = ShopifyPartnersClient(
    organization_id="your-org-id",
    access_token="prtapi_your-access-token",
    api_version="2025-04"
)

# Build and execute query with FieldSelector
fields = FieldSelector().add_fields('id', 'title', 'handle')
result = client.query('app', fields, id='your-app-id')
print(f"App: {result['app']['title']}")

client.close()
```

#### 🔧 Option 2: Raw GraphQL

```python
from shopify_partners_sdk import ShopifyPartnersClient

# Initialize the client
client = ShopifyPartnersClient(
    organization_id="your-org-id",
    access_token="prtapi_your-access-token",
    api_version="2025-04"
)

# Execute raw GraphQL
query = """
query GetApp($id: ID!) {
  app(id: $id) {
    id
    title
    handle
  }
}
"""
response = client.execute_raw(query, {"id": "your-app-id"})
result = response["data"]
print(f"App: {result['app']['title']}")

client.close()
```

### 3. Environment Variables

You can also configure the client using environment variables:

```bash
export SHOPIFY_PARTNERS_ORGANIZATION_ID="your-org-id"
export SHOPIFY_PARTNERS_ACCESS_TOKEN="prtapi_your-access-token"
export SHOPIFY_PARTNERS_API_VERSION="2025-04"
```

```python
from shopify_partners_sdk import ShopifyPartnersClient

# Client will automatically use environment variables
client = ShopifyPartnersClient()
```

## 📚 Usage Examples

### FieldSelector Approach (Recommended)

```python
from shopify_partners_sdk import FieldSelector, CommonFields

# Simple query
fields = FieldSelector().add_fields('id', 'title', 'handle', 'apiKey')
result = client.query('app', fields, id='app-id')

# Query with nested fields
app_fields = (FieldSelector()
    .add_fields('id', 'title', 'handle')
    .add_nested_field('shop', FieldSelector().add_fields('name', 'myshopifyDomain')))
result = client.query('app', app_fields, id='app-id')

# Paginated connection query
app_fields = CommonFields.basic_app()  # Predefined common fields
result = client.connection_query('apps', app_fields, first=25)

# Complex nested query with money fields
transaction_fields = (FieldSelector()
    .add_fields('id', 'createdAt', 'type')
    .add_money_field('netAmount')  # Automatically adds amount and currencyCode
    .add_nested_field('app', CommonFields.basic_app())
    .add_nested_field('shop', CommonFields.basic_shop()))

result = client.connection_query('transactions', transaction_fields, first=50)

# Complex query with nested connections
event_fields = FieldSelector().add_field('type')
app_fields = (FieldSelector()
    .add_field('name')
    .add_connection_field('events', event_fields, first=10))  # Connection with args
result = client.query('app', app_fields, id='app-id')
```

### Raw GraphQL Approach

```python
# Get a single app
query = """
query GetApp($id: ID!) {
  app(id: $id) {
    id
    title
    handle
    apiKey
  }
}
"""
response = client.execute_raw(query, {"id": "app-id"})
app = response["data"]["app"]

# Get API versions
query = """
query GetApiVersions {
  publicApiVersions {
    handle
    displayName
    supported
  }
}
"""
response = client.execute_raw(query)
versions = response["data"]["publicApiVersions"]

# Get paginated apps
query = """
query GetApps($first: Int!, $after: String) {
  apps(first: $first, after: $after) {
    edges {
      cursor
      node {
        id
        title
        handle
      }
    }
    pageInfo {
      hasNextPage
      hasPreviousPage
    }
  }
}
"""
response = client.execute_raw(query, {"first": 25})
apps = response["data"]["apps"]
```

### Mutations

#### FieldSelector Mutations (Recommended)

```python
# Create an app credit with FieldSelector
result_fields = (FieldSelector()
    .add_nested_field('appCredit', FieldSelector()
        .add_fields('id', 'description')
        .add_money_field('amount'))
    .add_nested_field('userErrors', FieldSelector()
        .add_fields('field', 'message')))

input_data = {
    "appId": "your-app-id",
    "amount": {"amount": "10.00", "currencyCode": "USD"},
    "description": "Refund for billing issue"
}

result = client.mutation('appCreditCreate', result_fields, input=input_data)

if result.get("userErrors"):
    print("Errors:", result["userErrors"])
else:
    print("Credit created:", result["appCredit"])
```

#### Raw GraphQL Mutations

```python
# Create an app credit
mutation = """
mutation CreateAppCredit($input: AppCreditCreateInput!) {
  appCreditCreate(input: $input) {
    appCredit {
      id
      description
      amount {
        amount
        currencyCode
      }
    }
    userErrors {
      field
      message
    }
  }
}
"""

input_data = {
    "appId": "your-app-id",
    "amount": {"amount": "10.00", "currencyCode": "USD"},
    "description": "Refund for billing issue"
}

response = client.execute_raw(mutation, {"input": input_data})
result = response["data"]
```

## 🏗️ Advanced Usage

### Custom HTTP Client

```python
import requests
from shopify_partners_sdk import ShopifyPartnersClient

# Custom HTTP client with specific settings
session = requests.Session()
session.timeout = 60.0

client = ShopifyPartnersClient(
    organization_id="your-org-id",
    access_token="your-token",
    http_client=session
)
```

### Error Handling

```python
from shopify_partners_sdk.exceptions import (
    AuthenticationError,
    RateLimitError,
    GraphQLError
)

try:
    # FieldSelector approach
    fields = FieldSelector().add_fields('id', 'title')
    result = client.query('app', fields, id='invalid-id')
except AuthenticationError:
    print("Invalid credentials")
except RateLimitError as e:
    print(f"Rate limited. Retry after: {e.retry_after} seconds")
except GraphQLError as e:
    print(f"GraphQL error: {e.message}")

try:
    # Raw GraphQL approach
    query = """
    query GetApp($id: ID!) {
      app(id: $id) { id title }
    }
    """
    response = client.execute_raw(query, {"id": "invalid-id"})
    if response.get("errors"):
        print("GraphQL errors:", response["errors"])
    else:
        result = response["data"]
except AuthenticationError:
    print("Invalid credentials")
except RateLimitError as e:
    print(f"Rate limited. Retry after: {e.retry_after} seconds")
```


### Configuration

```python
from shopify_partners_sdk.config import ShopifyPartnersSDKSettings

# Custom configuration
settings = ShopifyPartnersSDKSettings(
    organization_id="your-org-id",
    access_token="your-token",
    api_version="2025-04",
    base_url="https://partners.shopify.com",
    timeout_seconds=30.0,
    max_retries=3,
    log_level="INFO"
)

client = ShopifyPartnersClient.from_settings(settings)
```

## 🔍 Available Types and Fields

### Core Types

- **App**: `id`, `name`, `apiKey`, `events`
- **Shop**: `id`, `name`, `myshopifyDomain`, `avatarUrl`
- **Organization**: `id`, `name`, `avatarUrl`
- **Transaction**: `id`, `createdAt` (interface)
- **Money**: `amount`, `currencyCode`
- **AppEvent**: `type`, `occurredAt`, `app`, `shop` (interface)

### Billing Types

- **AppCharge**: `id`, `amount`, `name`, `test` (interface)
- **AppCredit**: `id`, `amount`, `name`, `test`
- **AppSubscription**: `id`, `amount`, `name`, `test`, `billingOn`
- **AppPurchaseOneTime**: `id`, `amount`, `name`, `test`

### Enums

- **Currency**: `USD`, `EUR`, `GBP`, `CAD`, `AUD`, etc.
- **AppEventTypes**: `RELATIONSHIP_INSTALLED`, `CREDIT_APPLIED`, `SUBSCRIPTION_CHARGE_ACCEPTED`, etc.
- **TransactionType**: `APP_ONE_TIME_SALE`, `APP_SUBSCRIPTION_SALE`, `SERVICE_SALE`, etc.
- **AppPricingInterval**: `EVERY_30_DAYS`, `ANNUAL`

## 🛠️ Development

### Setup Development Environment

```bash
# Clone the repository
git clone https://github.com/amitray007/shopify-partners-sdk.git
cd shopify-partners-sdk

# Install Poetry (if not already installed)
curl -sSL https://install.python-poetry.org | python3 -

# Install dependencies
poetry install

# Install pre-commit hooks
poetry run pre-commit install
```

## 🤝 Contributing

Contributions are welcome! Please read our [Contributing Guide](CONTRIBUTING.md) for details on our code of conduct and the process for submitting pull requests.

### Development Workflow

1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Make your changes
4. Add tests for your changes
5. Ensure all tests pass (`poetry run pytest`)
6. Commit your changes (`git commit -m 'Add amazing feature'`)
7. Push to the branch (`git push origin feature/amazing-feature`)
8. Open a Pull Request

## 📄 License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## 🔗 Links

- [Shopify Partners API Documentation](https://shopify.dev/docs/api/partners)
- [GraphQL Schema Reference](https://shopify.dev/docs/api/partners/reference)
- [Shopify Partners Dashboard](https://partners.shopify.com/)

## 📋 Changelog

See [CHANGELOG.md](CHANGELOG.md) for a list of changes and version history.

## 💬 Community & Support

- 📖 **[Documentation](https://shopify-partners-sdk.readthedocs.io)** - Comprehensive guides and API reference
- 🐛 **[Issue Tracker](https://github.com/amitray007/shopify-partners-sdk/issues)** - Bug reports and feature requests
- 💬 **[Discussions](https://github.com/amitray007/shopify-partners-sdk/discussions)** - Community Q&A and support
- 🚀 **[Examples](https://github.com/amitray007/shopify-partners-sdk/tree/main/examples)** - Real-world usage examples

## 🙏 Acknowledgments

- Built with [Requests](https://requests.readthedocs.io/) for reliable HTTP client functionality
- Uses [Pydantic](https://docs.pydantic.dev/) for data validation and settings management
- Inspired by the official Shopify GraphQL APIs and developer feedback

---

<div align="center">

**Made with ❤️ for the Shopify developer community**

[⭐ Star this repo](https://github.com/amitray007/shopify-partners-sdk) • [🐛 Report Bug](https://github.com/amitray007/shopify-partners-sdk/issues) • [💡 Request Feature](https://github.com/amitray007/shopify-partners-sdk/issues)

</div>


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "shopify-partners-sdk",
    "maintainer": "Amit Ray",
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": "mail@amitray.dev",
    "keywords": "shopify, partners, graphql, sdk, api, apps",
    "author": "Amit Ray",
    "author_email": "mail@amitray.dev",
    "download_url": "https://files.pythonhosted.org/packages/d7/db/41571dee33ad6f6b11d7ee506badbc7d1c99f876f951fd056e00358c6fa3/shopify_partners_sdk-0.1.2.tar.gz",
    "platform": null,
    "description": "# Shopify Partners SDK\n\n[![PyPI version](https://badge.fury.io/py/shopify-partners-sdk.svg)](https://badge.fury.io/py/shopify-partners-sdk)\n[![Python Support](https://img.shields.io/pypi/pyversions/shopify-partners-sdk.svg)](https://pypi.org/project/shopify-partners-sdk/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\n**Modern Python SDK for Shopify Partners API** - Comprehensive GraphQL client with type safety, automatic pagination, and dual query approaches (raw GraphQL + dynamic FieldSelector). Built for developers who want powerful functionality without complex abstractions.\n\n## \ud83d\ude80 Key Features\n\n### \ud83c\udfaf **Dual Query Approaches**\n- **Raw GraphQL** - Execute queries directly with full control\n- **Dynamic FieldSelector** - Build queries programmatically with type safety\n\n### \ud83d\udee1\ufe0f **Production-Ready**\n- **Type Safety** - Full type hints throughout the codebase\n- **Automatic Pagination** - Built-in cursor-based pagination support\n- **Intelligent Rate Limiting** - Exponential backoff with retry logic\n- **Comprehensive Error Handling** - Detailed GraphQL and HTTP error messages\n\n### \ud83d\ude80 **Developer Experience**\n- **Zero Complex Abstractions** - Direct GraphQL access with minimal overhead\n- **Synchronous API** - Simple, intuitive Python interface\n- **Extensible Architecture** - Easy to extend with custom field selections\n- **Rich Documentation** - Comprehensive examples and API reference\n\n## \ud83d\udce6 Installation\n\n### Using pip\n\n```bash\npip install shopify-partners-sdk\n```\n\n### Using Poetry\n\n```bash\npoetry add shopify-partners-sdk\n```\n\n### Development Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/amitray007/shopify-partners-sdk.git\ncd shopify-partners-sdk\n\n# Install with Poetry\npoetry install\n\n# Or with pip in development mode\npip install -e .\n```\n\n## \u26a1 Quick Start\n\n### 1. Get Your Credentials\n\nGet your credentials from the [Shopify Partners Dashboard](https://partners.shopify.com/):\n1. **Settings** \u2192 **API credentials**\n2. Create or select an API credential\n3. Copy your **Organization ID** and **Access Token** (starts with `prtapi_`)\n\n### 2. Choose Your Approach\n\nThe SDK provides two ways to interact with the Shopify Partners API:\n\n#### \ud83c\udfaf Option 1: FieldSelector (Recommended)\n\n```python\nfrom shopify_partners_sdk import ShopifyPartnersClient, FieldSelector\n\n# Initialize the client\nclient = ShopifyPartnersClient(\n    organization_id=\"your-org-id\",\n    access_token=\"prtapi_your-access-token\",\n    api_version=\"2025-04\"\n)\n\n# Build and execute query with FieldSelector\nfields = FieldSelector().add_fields('id', 'title', 'handle')\nresult = client.query('app', fields, id='your-app-id')\nprint(f\"App: {result['app']['title']}\")\n\nclient.close()\n```\n\n#### \ud83d\udd27 Option 2: Raw GraphQL\n\n```python\nfrom shopify_partners_sdk import ShopifyPartnersClient\n\n# Initialize the client\nclient = ShopifyPartnersClient(\n    organization_id=\"your-org-id\",\n    access_token=\"prtapi_your-access-token\",\n    api_version=\"2025-04\"\n)\n\n# Execute raw GraphQL\nquery = \"\"\"\nquery GetApp($id: ID!) {\n  app(id: $id) {\n    id\n    title\n    handle\n  }\n}\n\"\"\"\nresponse = client.execute_raw(query, {\"id\": \"your-app-id\"})\nresult = response[\"data\"]\nprint(f\"App: {result['app']['title']}\")\n\nclient.close()\n```\n\n### 3. Environment Variables\n\nYou can also configure the client using environment variables:\n\n```bash\nexport SHOPIFY_PARTNERS_ORGANIZATION_ID=\"your-org-id\"\nexport SHOPIFY_PARTNERS_ACCESS_TOKEN=\"prtapi_your-access-token\"\nexport SHOPIFY_PARTNERS_API_VERSION=\"2025-04\"\n```\n\n```python\nfrom shopify_partners_sdk import ShopifyPartnersClient\n\n# Client will automatically use environment variables\nclient = ShopifyPartnersClient()\n```\n\n## \ud83d\udcda Usage Examples\n\n### FieldSelector Approach (Recommended)\n\n```python\nfrom shopify_partners_sdk import FieldSelector, CommonFields\n\n# Simple query\nfields = FieldSelector().add_fields('id', 'title', 'handle', 'apiKey')\nresult = client.query('app', fields, id='app-id')\n\n# Query with nested fields\napp_fields = (FieldSelector()\n    .add_fields('id', 'title', 'handle')\n    .add_nested_field('shop', FieldSelector().add_fields('name', 'myshopifyDomain')))\nresult = client.query('app', app_fields, id='app-id')\n\n# Paginated connection query\napp_fields = CommonFields.basic_app()  # Predefined common fields\nresult = client.connection_query('apps', app_fields, first=25)\n\n# Complex nested query with money fields\ntransaction_fields = (FieldSelector()\n    .add_fields('id', 'createdAt', 'type')\n    .add_money_field('netAmount')  # Automatically adds amount and currencyCode\n    .add_nested_field('app', CommonFields.basic_app())\n    .add_nested_field('shop', CommonFields.basic_shop()))\n\nresult = client.connection_query('transactions', transaction_fields, first=50)\n\n# Complex query with nested connections\nevent_fields = FieldSelector().add_field('type')\napp_fields = (FieldSelector()\n    .add_field('name')\n    .add_connection_field('events', event_fields, first=10))  # Connection with args\nresult = client.query('app', app_fields, id='app-id')\n```\n\n### Raw GraphQL Approach\n\n```python\n# Get a single app\nquery = \"\"\"\nquery GetApp($id: ID!) {\n  app(id: $id) {\n    id\n    title\n    handle\n    apiKey\n  }\n}\n\"\"\"\nresponse = client.execute_raw(query, {\"id\": \"app-id\"})\napp = response[\"data\"][\"app\"]\n\n# Get API versions\nquery = \"\"\"\nquery GetApiVersions {\n  publicApiVersions {\n    handle\n    displayName\n    supported\n  }\n}\n\"\"\"\nresponse = client.execute_raw(query)\nversions = response[\"data\"][\"publicApiVersions\"]\n\n# Get paginated apps\nquery = \"\"\"\nquery GetApps($first: Int!, $after: String) {\n  apps(first: $first, after: $after) {\n    edges {\n      cursor\n      node {\n        id\n        title\n        handle\n      }\n    }\n    pageInfo {\n      hasNextPage\n      hasPreviousPage\n    }\n  }\n}\n\"\"\"\nresponse = client.execute_raw(query, {\"first\": 25})\napps = response[\"data\"][\"apps\"]\n```\n\n### Mutations\n\n#### FieldSelector Mutations (Recommended)\n\n```python\n# Create an app credit with FieldSelector\nresult_fields = (FieldSelector()\n    .add_nested_field('appCredit', FieldSelector()\n        .add_fields('id', 'description')\n        .add_money_field('amount'))\n    .add_nested_field('userErrors', FieldSelector()\n        .add_fields('field', 'message')))\n\ninput_data = {\n    \"appId\": \"your-app-id\",\n    \"amount\": {\"amount\": \"10.00\", \"currencyCode\": \"USD\"},\n    \"description\": \"Refund for billing issue\"\n}\n\nresult = client.mutation('appCreditCreate', result_fields, input=input_data)\n\nif result.get(\"userErrors\"):\n    print(\"Errors:\", result[\"userErrors\"])\nelse:\n    print(\"Credit created:\", result[\"appCredit\"])\n```\n\n#### Raw GraphQL Mutations\n\n```python\n# Create an app credit\nmutation = \"\"\"\nmutation CreateAppCredit($input: AppCreditCreateInput!) {\n  appCreditCreate(input: $input) {\n    appCredit {\n      id\n      description\n      amount {\n        amount\n        currencyCode\n      }\n    }\n    userErrors {\n      field\n      message\n    }\n  }\n}\n\"\"\"\n\ninput_data = {\n    \"appId\": \"your-app-id\",\n    \"amount\": {\"amount\": \"10.00\", \"currencyCode\": \"USD\"},\n    \"description\": \"Refund for billing issue\"\n}\n\nresponse = client.execute_raw(mutation, {\"input\": input_data})\nresult = response[\"data\"]\n```\n\n## \ud83c\udfd7\ufe0f Advanced Usage\n\n### Custom HTTP Client\n\n```python\nimport requests\nfrom shopify_partners_sdk import ShopifyPartnersClient\n\n# Custom HTTP client with specific settings\nsession = requests.Session()\nsession.timeout = 60.0\n\nclient = ShopifyPartnersClient(\n    organization_id=\"your-org-id\",\n    access_token=\"your-token\",\n    http_client=session\n)\n```\n\n### Error Handling\n\n```python\nfrom shopify_partners_sdk.exceptions import (\n    AuthenticationError,\n    RateLimitError,\n    GraphQLError\n)\n\ntry:\n    # FieldSelector approach\n    fields = FieldSelector().add_fields('id', 'title')\n    result = client.query('app', fields, id='invalid-id')\nexcept AuthenticationError:\n    print(\"Invalid credentials\")\nexcept RateLimitError as e:\n    print(f\"Rate limited. Retry after: {e.retry_after} seconds\")\nexcept GraphQLError as e:\n    print(f\"GraphQL error: {e.message}\")\n\ntry:\n    # Raw GraphQL approach\n    query = \"\"\"\n    query GetApp($id: ID!) {\n      app(id: $id) { id title }\n    }\n    \"\"\"\n    response = client.execute_raw(query, {\"id\": \"invalid-id\"})\n    if response.get(\"errors\"):\n        print(\"GraphQL errors:\", response[\"errors\"])\n    else:\n        result = response[\"data\"]\nexcept AuthenticationError:\n    print(\"Invalid credentials\")\nexcept RateLimitError as e:\n    print(f\"Rate limited. Retry after: {e.retry_after} seconds\")\n```\n\n\n### Configuration\n\n```python\nfrom shopify_partners_sdk.config import ShopifyPartnersSDKSettings\n\n# Custom configuration\nsettings = ShopifyPartnersSDKSettings(\n    organization_id=\"your-org-id\",\n    access_token=\"your-token\",\n    api_version=\"2025-04\",\n    base_url=\"https://partners.shopify.com\",\n    timeout_seconds=30.0,\n    max_retries=3,\n    log_level=\"INFO\"\n)\n\nclient = ShopifyPartnersClient.from_settings(settings)\n```\n\n## \ud83d\udd0d Available Types and Fields\n\n### Core Types\n\n- **App**: `id`, `name`, `apiKey`, `events`\n- **Shop**: `id`, `name`, `myshopifyDomain`, `avatarUrl`\n- **Organization**: `id`, `name`, `avatarUrl`\n- **Transaction**: `id`, `createdAt` (interface)\n- **Money**: `amount`, `currencyCode`\n- **AppEvent**: `type`, `occurredAt`, `app`, `shop` (interface)\n\n### Billing Types\n\n- **AppCharge**: `id`, `amount`, `name`, `test` (interface)\n- **AppCredit**: `id`, `amount`, `name`, `test`\n- **AppSubscription**: `id`, `amount`, `name`, `test`, `billingOn`\n- **AppPurchaseOneTime**: `id`, `amount`, `name`, `test`\n\n### Enums\n\n- **Currency**: `USD`, `EUR`, `GBP`, `CAD`, `AUD`, etc.\n- **AppEventTypes**: `RELATIONSHIP_INSTALLED`, `CREDIT_APPLIED`, `SUBSCRIPTION_CHARGE_ACCEPTED`, etc.\n- **TransactionType**: `APP_ONE_TIME_SALE`, `APP_SUBSCRIPTION_SALE`, `SERVICE_SALE`, etc.\n- **AppPricingInterval**: `EVERY_30_DAYS`, `ANNUAL`\n\n## \ud83d\udee0\ufe0f Development\n\n### Setup Development Environment\n\n```bash\n# Clone the repository\ngit clone https://github.com/amitray007/shopify-partners-sdk.git\ncd shopify-partners-sdk\n\n# Install Poetry (if not already installed)\ncurl -sSL https://install.python-poetry.org | python3 -\n\n# Install dependencies\npoetry install\n\n# Install pre-commit hooks\npoetry run pre-commit install\n```\n\n## \ud83e\udd1d Contributing\n\nContributions are welcome! Please read our [Contributing Guide](CONTRIBUTING.md) for details on our code of conduct and the process for submitting pull requests.\n\n### Development Workflow\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Make your changes\n4. Add tests for your changes\n5. Ensure all tests pass (`poetry run pytest`)\n6. Commit your changes (`git commit -m 'Add amazing feature'`)\n7. Push to the branch (`git push origin feature/amazing-feature`)\n8. Open a Pull Request\n\n## \ud83d\udcc4 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## \ud83d\udd17 Links\n\n- [Shopify Partners API Documentation](https://shopify.dev/docs/api/partners)\n- [GraphQL Schema Reference](https://shopify.dev/docs/api/partners/reference)\n- [Shopify Partners Dashboard](https://partners.shopify.com/)\n\n## \ud83d\udccb Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md) for a list of changes and version history.\n\n## \ud83d\udcac Community & Support\n\n- \ud83d\udcd6 **[Documentation](https://shopify-partners-sdk.readthedocs.io)** - Comprehensive guides and API reference\n- \ud83d\udc1b **[Issue Tracker](https://github.com/amitray007/shopify-partners-sdk/issues)** - Bug reports and feature requests\n- \ud83d\udcac **[Discussions](https://github.com/amitray007/shopify-partners-sdk/discussions)** - Community Q&A and support\n- \ud83d\ude80 **[Examples](https://github.com/amitray007/shopify-partners-sdk/tree/main/examples)** - Real-world usage examples\n\n## \ud83d\ude4f Acknowledgments\n\n- Built with [Requests](https://requests.readthedocs.io/) for reliable HTTP client functionality\n- Uses [Pydantic](https://docs.pydantic.dev/) for data validation and settings management\n- Inspired by the official Shopify GraphQL APIs and developer feedback\n\n---\n\n<div align=\"center\">\n\n**Made with \u2764\ufe0f for the Shopify developer community**\n\n[\u2b50 Star this repo](https://github.com/amitray007/shopify-partners-sdk) \u2022 [\ud83d\udc1b Report Bug](https://github.com/amitray007/shopify-partners-sdk/issues) \u2022 [\ud83d\udca1 Request Feature](https://github.com/amitray007/shopify-partners-sdk/issues)\n\n</div>\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Modern Python GraphQL SDK for Shopify Partners API",
    "version": "0.1.2",
    "project_urls": {
        "Bug Tracker": "https://github.com/amitray007/shopify-partners-sdk/issues",
        "Changelog": "https://github.com/amitray007/shopify-partners-sdk/blob/main/CHANGELOG.md",
        "Contributing": "https://github.com/amitray007/shopify-partners-sdk/blob/main/CONTRIBUTING.md",
        "Documentation": "https://shopify-partners-sdk.readthedocs.io",
        "Funding": "https://github.com/sponsors/amitray007",
        "Homepage": "https://github.com/amitray007/shopify-partners-sdk",
        "Repository": "https://github.com/amitray007/shopify-partners-sdk",
        "Source": "https://github.com/amitray007/shopify-partners-sdk"
    },
    "split_keywords": [
        "shopify",
        " partners",
        " graphql",
        " sdk",
        " api",
        " apps"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "7d7f17c9d5520df3321e591f731756a68fb095e81876efb9b14be74e622a0bb8",
                "md5": "1635441bddbee83fe2f0fe8b1da7b817",
                "sha256": "786c21effc69293a0b5b45a8ad255ffe3065a1270bc54dc0d2d8a7c8cccc1ab8"
            },
            "downloads": -1,
            "filename": "shopify_partners_sdk-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1635441bddbee83fe2f0fe8b1da7b817",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 56600,
            "upload_time": "2025-09-14T21:42:48",
            "upload_time_iso_8601": "2025-09-14T21:42:48.389272Z",
            "url": "https://files.pythonhosted.org/packages/7d/7f/17c9d5520df3321e591f731756a68fb095e81876efb9b14be74e622a0bb8/shopify_partners_sdk-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d7db41571dee33ad6f6b11d7ee506badbc7d1c99f876f951fd056e00358c6fa3",
                "md5": "eaf7c5d7ba2ed8a13b7356d132629470",
                "sha256": "154dfb5a63382657c287f7678e8e076bde77eedc5a581cb16851c42c8771e59c"
            },
            "downloads": -1,
            "filename": "shopify_partners_sdk-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "eaf7c5d7ba2ed8a13b7356d132629470",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 47170,
            "upload_time": "2025-09-14T21:42:49",
            "upload_time_iso_8601": "2025-09-14T21:42:49.868624Z",
            "url": "https://files.pythonhosted.org/packages/d7/db/41571dee33ad6f6b11d7ee506badbc7d1c99f876f951fd056e00358c6fa3/shopify_partners_sdk-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-14 21:42:49",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "amitray007",
    "github_project": "shopify-partners-sdk",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "requests",
            "specs": [
                [
                    "<",
                    "3.0.0"
                ],
                [
                    ">=",
                    "2.31.0"
                ]
            ]
        },
        {
            "name": "pydantic",
            "specs": [
                [
                    "<",
                    "3.0.0"
                ],
                [
                    ">=",
                    "2.8.0"
                ]
            ]
        },
        {
            "name": "pydantic-settings",
            "specs": [
                [
                    "<",
                    "3.0.0"
                ],
                [
                    ">=",
                    "2.4.0"
                ]
            ]
        },
        {
            "name": "typing-extensions",
            "specs": [
                [
                    "<",
                    "5.0.0"
                ],
                [
                    ">=",
                    "4.8.0"
                ]
            ]
        }
    ],
    "lcname": "shopify-partners-sdk"
}
        
Elapsed time: 3.76332s