Skip to content
Open
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
14 changes: 7 additions & 7 deletions examples/pydantic_source/main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from fastapi import FastAPI
from typing import Type, Tuple, Any
from typing import Any

from pydantic import Field, BaseModel
from pydantic_settings import (
Expand Down Expand Up @@ -65,12 +65,12 @@ class RRTreeSource(BaseSettings):
@classmethod
def settings_customise_sources(
cls,
settings_cls: Type[BaseSettings],
settings_cls: type[BaseSettings],
init_settings: PydanticBaseSettingsSource,
env_settings: PydanticBaseSettingsSource,
dotenv_settings: PydanticBaseSettingsSource,
file_secret_settings: PydanticBaseSettingsSource,
) -> Tuple[PydanticBaseSettingsSource, ...]:
) -> tuple[PydanticBaseSettingsSource, ...]:
return (
init_settings,
ConfigTreeSource(
Expand Down Expand Up @@ -121,12 +121,12 @@ class RRTreeSourceWithPrefix(BaseSettings):
@classmethod
def settings_customise_sources(
cls,
settings_cls: Type[BaseSettings],
settings_cls: type[BaseSettings],
init_settings: PydanticBaseSettingsSource,
env_settings: PydanticBaseSettingsSource,
dotenv_settings: PydanticBaseSettingsSource,
file_secret_settings: PydanticBaseSettingsSource,
) -> Tuple[PydanticBaseSettingsSource, ...]:
) -> tuple[PydanticBaseSettingsSource, ...]:
return (
init_settings,
ConfigTreeSource(
Expand Down Expand Up @@ -204,12 +204,12 @@ class RRTreeSourceLocal(BaseSettings):
@classmethod
def settings_customise_sources(
cls,
settings_cls: Type[BaseSettings],
settings_cls: type[BaseSettings],
init_settings: PydanticBaseSettingsSource,
env_settings: PydanticBaseSettingsSource,
dotenv_settings: PydanticBaseSettingsSource,
file_secret_settings: PydanticBaseSettingsSource,
) -> Tuple[PydanticBaseSettingsSource, ...]:
) -> tuple[PydanticBaseSettingsSource, ...]:
return (
init_settings,
ConfigTreeSource(
Expand Down
10 changes: 3 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@ dynamic = ["version"]
description = "Python SDK for rapyuta.io v2 APIs"
dependencies = [
"httpx>=0.27.2",
"munch>=4.0.0",
"pydantic-settings>=2.7.1",
"python-benedict>=0.34.1",
"pyyaml>=6.0.2",
]
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">= 3.8"
requires-python = ">= 3.10"

[build-system]
requires = ["hatchling"]
Expand Down Expand Up @@ -74,18 +73,15 @@ exclude = [
"venv",
]

# Same as Black.
target-version = "py310"
line-length = 90
indent-width = 4

# Assume Python 3.8
target-version = "py38"

[tool.ruff.lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
# McCabe complexity (`C901`) by default.
select = ["E4", "E7", "E9", "F", "B", "Q", "W", "N816"]
select = ["E4", "E7", "E9", "F", "B", "Q", "W", "N816", "UP"]
ignore = ["E741", "B904"]

# Allow fix for all enabled rules (when `--fix`) is provided.
Expand Down
31 changes: 30 additions & 1 deletion rapyuta_io_sdk_v2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,33 @@
from rapyuta_io_sdk_v2.config import Configuration
from rapyuta_io_sdk_v2.utils import walk_pages

__version__ = "0.2.1"
# Import all models directly into the main namespace
from .models import (
# Core models
Secret,
StaticRoute,
Disk,
Deployment,
Package,
Project,
Network,
User,
Organization,
# List models
ProjectList,
DeploymentList,
DiskList,
NetworkList,
PackageList,
SecretList,
StaticRouteList,
# Managed service models
ManagedServiceProvider,
ManagedServiceBinding,
ManagedServiceBindingList,
ManagedServiceInstance,
ManagedServiceInstanceList,
ManagedServiceProviderList,
)

__version__ = "0.3.0"
Loading