From d2c69fa3a39e3b908dbb504e9c68741b25594d48 Mon Sep 17 00:00:00 2001 From: filoxenace Date: Tue, 17 Feb 2026 19:28:52 -0500 Subject: [PATCH] Initial commit --- pyproject.toml | 15 +++++++++++ src/rbx_upload/models.py | 56 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 pyproject.toml create mode 100644 src/rbx_upload/models.py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..b1c427f --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,15 @@ +[project] +name = "rbx-upload" +version = "0.1.0" +description = "Roblox asset upload client" +requires-python = ">=3.13" +dependencies = [ + "httpx>=0.25.0", +] + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.hatch.build.targets.wheel] +packages = ["src/rbx_upload"] diff --git a/src/rbx_upload/models.py b/src/rbx_upload/models.py new file mode 100644 index 0000000..52d3de4 --- /dev/null +++ b/src/rbx_upload/models.py @@ -0,0 +1,56 @@ +from enum import IntEnum +from typing import Literal + + +class RbxAssetType(IntEnum): + IMAGE = 1 + SHIRT = 11 + PANTS = 12 + + +ClothingAssetType = Literal[ + RbxAssetType.SHIRT, + RbxAssetType.PANTS, +] +CreatorType = Literal["User", "Group"] + + +class RbxCreator: + def __init__(self, creator_id: int, username: str, creator_type: CreatorType): + self.creator_id = creator_id + self.username = username + self.creator_type = creator_type + + +class RbxAsset: + def __init__( + self, + asset_id: int, + creator: RbxCreator, + name: str, + description: str, + asset_type: RbxAssetType, + ) -> None: + self.asset_id = asset_id + self.name = name + self.description = description + self.creator = creator + self.asset_type = asset_type + + +class ClothingAsset(RbxAsset): + def __init__( + self, + asset_id: int, + creator: RbxCreator, + name: str, + description: str, + asset_type: ClothingAssetType, + ) -> None: + super().__init__( + asset_id=asset_id, + creator=creator, + name=name, + description=description, + asset_type=asset_type, + )