Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions ANNOUNCEMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# shipthisapi-python v3.0.0 Release

We're excited to announce the release of **shipthisapi-python v3.0.0** - now with full async support!

## What's New

### Async-First Design
The library has been completely rewritten to support async/await, making it perfect for modern Python applications like FastAPI, aiohttp, and other async frameworks.

```python
import asyncio
from ShipthisAPI import ShipthisAPI

async def main():
client = ShipthisAPI(
organisation="your_org_id",
x_api_key="your_api_key"
)

await client.connect()

# Fetch shipments
shipments = await client.get_list("sea_shipment")

# Update a document
await client.patch_item(
"fcl_load",
"68a4f906743189ad061429a7",
update_fields={"container_no": "CONT123"}
)

asyncio.run(main())
```

### Custom Headers Support
Server-to-server authentication is now supported via custom headers:

```python
client = ShipthisAPI(
organisation="org_id",
custom_headers={
"authorization": "Bearer your_token",
# ... other custom headers
}
)
```

### Simplified Field Updates
`patch_item` is now the recommended way to update document fields. It provides:
- Full field validation
- Workflow triggers
- Audit logging
- Business logic execution

## Breaking Changes

1. **All methods are now async** - You must use `await` when calling API methods
2. **`requests` replaced with `httpx`** - The library now uses `httpx` for HTTP calls
3. **Removed deprecated methods**:
- `webhook_sync` - Use `patch_item` instead
- `webhook_update` - Use `patch_item` instead

## Installation

```bash
pip install shipthisapi-python==3.0.0
```

Or update your requirements:
```
shipthisapi-python>=3.0.0
```

## Migration Guide

See [CHANGELOG.md](./CHANGELOG.md) for a detailed migration guide from v2.x to v3.x.

## Questions or Issues?

- Open an issue on [GitHub](https://github.com/shipthisco/shipthisapi-python/issues)
- Contact support at support@shipthis.co
83 changes: 83 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Changelog

All notable changes to this project will be documented in this file.

## [3.0.0] - 2025-02-06

### Breaking Changes
- **Async-first**: All API methods are now async and require `await`
- Replaced `requests` library with `httpx` for async HTTP support
- Removed `webhook_sync` and `webhook_update` methods (use `patch_item` instead)

### Added
- Full async/await support using `httpx`
- `custom_headers` parameter for server-to-server authentication
- `create_reference_linked_field` method
- Per-request header override support

### Changed
- `x_api_key` is now optional (can use `custom_headers` for auth)
- `patch_item` is now the recommended method for updating document fields
- Updated all method signatures to be async

### Migration Guide

**Before (v2.x):**
```python
from ShipthisAPI import ShipthisAPI

client = ShipthisAPI(organisation="org_id", x_api_key="key")
client.connect()
items = client.get_list("shipment")
client.patch_item("fcl_load", doc_id, {"status": "done"})
```

**After (v3.x):**
```python
import asyncio
from ShipthisAPI import ShipthisAPI

async def main():
client = ShipthisAPI(organisation="org_id", x_api_key="key")
await client.connect()
items = await client.get_list("shipment")
await client.patch_item("fcl_load", doc_id, {"status": "done"})

asyncio.run(main())
```

## [2.2.0] - 2025-02-06

### Added
- `custom_headers` parameter for overriding default headers
- `create_reference_linked_field` method
- Per-request header override in `_make_request`

### Changed
- `x_api_key` is now optional
- Enhanced `patch_item` documentation

## [2.1.0] - 2025-01-15

### Added
- `primary_workflow_action` method for workflow transitions
- `secondary_workflow_action` method for sub-status changes
- `bulk_edit` method for batch updates

## [2.0.0] - 2024-12-01

### Added
- Complete rewrite with better error handling
- `ShipthisAPIError`, `ShipthisAuthError`, `ShipthisRequestError` exceptions
- Comprehensive CRUD operations
- Workflow operations
- Report views
- Third-party integrations (currency, places)
- Conversation methods
- File upload support

## [1.0.0] - 2024-06-01

### Added
- Initial release
- Basic API client functionality
2 changes: 1 addition & 1 deletion ShipthisAPI/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# __variables__ with double-quoted values will be available in setup.py
__version__ = "2.2.0"
__version__ = "3.0.0"

from .shipthisapi import (
ShipthisAPI,
Expand Down
Loading
Loading