Metadata-Version: 2.4
Name: featurejet
Version: 0.2.0
Summary: Official Python SDK for the FeatureJet public developer API.
Project-URL: Homepage, https://featurejet.com
Project-URL: Documentation, https://featurejet.com/docs/sdks
Project-URL: Repository, https://github.com/featurejet/featurejet
Project-URL: Changelog, https://feedback.featurejet.com
Author-email: FeatureJet <hello@featurejet.com>
License-Expression: MIT
License-File: LICENSE
Keywords: api-client,feature-requests,featurejet,feedback,sdk
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: httpx2[brotli,http2,zstd]>=0.1
Requires-Dist: pydantic>=2.8
Requires-Dist: typing-extensions>=4.12
Description-Content-Type: text/markdown

# FeatureJet Python SDK

Official synchronous Python client for the FeatureJet public developer API.

## Install

```bash
pip install featurejet
```

## Quickstart

API keys are minted in the FeatureJet dashboard and begin with `fj_live_`.
The SDK sends the key as an `Authorization: Bearer` header.

```python
from featurejet import (
    ApiPostCreateRequest,
    FeatureJetClient,
    FeatureJetClientConfig,
)

with FeatureJetClient(
    FeatureJetClientConfig(api_key="fj_live_REPLACE_ME"),
) as client:
    posts = client.list_posts("feedback", limit=25, offset=0)
    for post in posts.posts:
        print(post.title, post.vote_count)

    created = client.create_post(
        "feedback",
        ApiPostCreateRequest(
            title="Dark mode",
            body="Please add a system theme",
            tags=["UI"],
        ),
    )
    print(created.id)
```

The default base URL is `https://api.featurejet.com`. Configure a different
host by passing `base_url` to `FeatureJetClientConfig`.

## Endpoints

| API endpoint | SDK method |
| --- | --- |
| `GET /api/v1/boards` | `list_boards()` |
| `GET /api/v1/boards/{slug}` | `get_board(slug)` |
| `GET /api/v1/boards/{slug}/posts` | `list_posts(slug, ...)` |
| `POST /api/v1/boards/{slug}/posts` | `create_post(slug, request)` |
| `GET /api/v1/boards/{slug}/posts/{id}` | `get_post(slug, post_id)` |
| `PATCH /api/v1/boards/{slug}/posts/{id}` | `update_post(slug, post_id, request)` |
| `DELETE /api/v1/boards/{slug}/posts/{id}` | `delete_post(slug, post_id)` |
| `GET /api/v1/boards/{slug}/posts/{id}/votes` | `list_votes(slug, post_id)` |
| `GET /api/v1/boards/{slug}/posts/{id}/comments` | `list_comments(slug, post_id)` |
| `GET /api/v1/boards/{slug}/roadmap` | `get_roadmap(slug)` |
| `GET /api/v1/boards/{slug}/changelog` | `get_changelog(slug, ...)` |
| `GET /api/v1/boards/{slug}/ship-stats` | `get_ship_stats(slug, ...)` |
| `GET /api/v1/boards/{slug}/analytics` | `get_analytics(slug, ...)` |

Pagination is explicit: `list_posts` and `get_changelog` accept `limit` and
`offset`. The API defaults to 100 results and permits at most 500.

## Errors and rate limits

API error envelopes raise `FeatureJetApiError`. HTTP 429 responses raise the
`FeatureJetRateLimitError` subclass; its `retry_after` attribute contains the
integer `Retry-After` value when the response includes one. The public API is
limited to 120 requests per minute per API key. The SDK does not retry requests
automatically.
