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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ All notable changes to CryptoServe will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [SDK 1.4.3] - 2026-03-18

### Fixed
- CryptoClient and AsyncCryptoClient now accept `base_url` as keyword alias for `server_url` for backwards compatibility
- Clarified easy.py encrypt/decrypt docstrings to state these are offline password-based functions, not server-connected operations with crypto contexts

---

## [CLI 0.3.4] - 2026-03-17

### Added
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/cryptoserve/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
STREAMING = Usage.STREAMING
DISK = Usage.DISK

__version__ = "1.4.2"
__version__ = "1.4.3"
__all__ = [
# Main SDK class
"CryptoServe",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,27 @@ class AsyncCryptoClient:

def __init__(
self,
server_url: str,
token: str,
server_url: str | None = None,
token: str = "",
timeout: float = 30.0,
user_agent: str | None = None,
*,
base_url: str | None = None,
):
"""
Initialize the async client.

Args:
server_url: Base URL of the CryptoServe server
server_url: Base URL of the CryptoServe server (also accepts ``base_url`` as alias)
token: Identity token for authentication
timeout: Request timeout in seconds
user_agent: Custom user agent string
base_url: Alias for ``server_url`` (keyword-only, for backwards compatibility)
"""
self.server_url = server_url.rstrip("/")
url = server_url or base_url
if url is None:
raise TypeError("AsyncCryptoClient requires 'server_url' (or 'base_url') argument")
self.server_url = url.rstrip("/")
self.token = token
self.timeout = timeout

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,21 +61,23 @@ class CryptoClient:

def __init__(
self,
server_url: str,
token: str,
server_url: str | None = None,
token: str = "",
refresh_token: Optional[str] = None,
auto_refresh: bool = True,
timeout: float = 30.0,
user_agent: str | None = None,
retry_config: RetryConfig | None = None,
circuit_config: CircuitBreakerConfig | None = None,
enable_resilience: bool = False,
*,
base_url: str | None = None,
):
"""
Initialize the client.

Args:
server_url: CryptoServe server URL
server_url: CryptoServe server URL (also accepts ``base_url`` as alias)
token: Access token for API calls
refresh_token: Optional refresh token for auto-refresh
auto_refresh: Enable automatic token refresh (default: True)
Expand All @@ -84,8 +86,12 @@ def __init__(
retry_config: Retry configuration (None to use defaults when enabled)
circuit_config: Circuit breaker configuration (None to use defaults when enabled)
enable_resilience: Enable retry and circuit breaker with production defaults
base_url: Alias for ``server_url`` (keyword-only, for backwards compatibility)
"""
self.server_url = server_url.rstrip("/")
url = server_url or base_url
if url is None:
raise TypeError("CryptoClient requires 'server_url' (or 'base_url') argument")
self.server_url = url.rstrip("/")
self._access_token = token
self._refresh_token = refresh_token
self._auto_refresh = auto_refresh and refresh_token is not None
Expand Down
14 changes: 12 additions & 2 deletions sdk/python/packages/cryptoserve-core/cryptoserve_core/easy.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ class EasyEncryptionError(CipherError):

def encrypt(plaintext: Union[bytes, str], password: str) -> bytes:
"""
Encrypt data with a password.
Encrypt data with a password (offline, no server required).

This is a standalone password-based encryption function that runs entirely
locally. It does not use server-managed keys or crypto contexts. For
server-connected encryption with context-based key management, use
:meth:`CryptoClient.encrypt` from ``cryptoserve-client`` instead.

Uses PBKDF2 key derivation (600K iterations) and AES-256-GCM.
Each call generates a fresh random salt and nonce.
Expand Down Expand Up @@ -71,7 +76,12 @@ def encrypt(plaintext: Union[bytes, str], password: str) -> bytes:

def decrypt(ciphertext: bytes, password: str) -> bytes:
"""
Decrypt data encrypted with encrypt().
Decrypt data encrypted with encrypt() (offline, no server required).

This is a standalone password-based decryption function that runs entirely
locally. It does not use server-managed keys or crypto contexts. For
server-connected decryption, use :meth:`CryptoClient.decrypt` from
``cryptoserve-client`` instead.

Args:
ciphertext: Encrypted blob from encrypt().
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "cryptoserve"
version = "1.4.2"
version = "1.4.3"
description = "CryptoServe SDK - Zero-config cryptographic operations with auto-registration and local key caching"
readme = "README.md"
license = {text = "Apache-2.0"}
Expand Down
Loading