coolipy.resources.tags

Tags resource clients (sync + async).

Classes

class AsyncTags (transport: AsyncTransport)
Expand source code
class AsyncTags(AsyncResourceBase):
    """Asynchronous client for Coolify tags."""

    async def list(self) -> CoolipyAPIResponse[TagList]:
        """List all tags."""
        return await self._get("/tags", response_model=list[Tag])

    async def create(self, model: TagCreate) -> CoolipyAPIResponse[Tag]:
        """Create a tag."""
        return await self._post("/tags", json=_dump(model), response_model=Tag)

    async def update(self, uuid: str, model: TagUpdate) -> CoolipyAPIResponse[Tag]:
        """Update a tag by UUID."""
        return await self._patch(f"/tags/{uuid}", json=_dump(model), response_model=Tag)

    async def delete(self, uuid: str) -> CoolipyAPIResponse[MessageResponse]:
        """Delete a tag by UUID."""
        return await self._delete(f"/tags/{uuid}", response_model=MessageResponse)

Asynchronous client for Coolify tags.

Ancestors

  • coolipy._base.AsyncResourceBase

Methods

async def create(self, model: TagCreate) ‑> coolipy._response.CoolipyAPIResponse[Tag]
Expand source code
async def create(self, model: TagCreate) -> CoolipyAPIResponse[Tag]:
    """Create a tag."""
    return await self._post("/tags", json=_dump(model), response_model=Tag)

Create a tag.

async def delete(self, uuid: str) ‑> coolipy._response.CoolipyAPIResponse[MessageResponse]
Expand source code
async def delete(self, uuid: str) -> CoolipyAPIResponse[MessageResponse]:
    """Delete a tag by UUID."""
    return await self._delete(f"/tags/{uuid}", response_model=MessageResponse)

Delete a tag by UUID.

async def list(self) ‑> coolipy._response.CoolipyAPIResponse[list[Tag]]
Expand source code
async def list(self) -> CoolipyAPIResponse[TagList]:
    """List all tags."""
    return await self._get("/tags", response_model=list[Tag])

List all tags.

async def update(self, uuid: str, model: TagUpdate) ‑> coolipy._response.CoolipyAPIResponse[Tag]
Expand source code
async def update(self, uuid: str, model: TagUpdate) -> CoolipyAPIResponse[Tag]:
    """Update a tag by UUID."""
    return await self._patch(f"/tags/{uuid}", json=_dump(model), response_model=Tag)

Update a tag by UUID.

class Tags (transport: SyncTransport)
Expand source code
class Tags(ResourceBase):
    """Synchronous client for Coolify tags."""

    def list(self) -> CoolipyAPIResponse[TagList]:
        """List all tags."""
        return self._get("/tags", response_model=list[Tag])

    def create(self, model: TagCreate) -> CoolipyAPIResponse[Tag]:
        """Create a tag."""
        return self._post("/tags", json=_dump(model), response_model=Tag)

    def update(self, uuid: str, model: TagUpdate) -> CoolipyAPIResponse[Tag]:
        """Update a tag by UUID."""
        return self._patch(f"/tags/{uuid}", json=_dump(model), response_model=Tag)

    def delete(self, uuid: str) -> CoolipyAPIResponse[MessageResponse]:
        """Delete a tag by UUID."""
        return self._delete(f"/tags/{uuid}", response_model=MessageResponse)

Synchronous client for Coolify tags.

Ancestors

  • coolipy._base.ResourceBase

Methods

def create(self, model: TagCreate) ‑> coolipy._response.CoolipyAPIResponse[Tag]
Expand source code
def create(self, model: TagCreate) -> CoolipyAPIResponse[Tag]:
    """Create a tag."""
    return self._post("/tags", json=_dump(model), response_model=Tag)

Create a tag.

def delete(self, uuid: str) ‑> coolipy._response.CoolipyAPIResponse[MessageResponse]
Expand source code
def delete(self, uuid: str) -> CoolipyAPIResponse[MessageResponse]:
    """Delete a tag by UUID."""
    return self._delete(f"/tags/{uuid}", response_model=MessageResponse)

Delete a tag by UUID.

def list(self) ‑> coolipy._response.CoolipyAPIResponse[list[Tag]]
Expand source code
def list(self) -> CoolipyAPIResponse[TagList]:
    """List all tags."""
    return self._get("/tags", response_model=list[Tag])

List all tags.

def update(self, uuid: str, model: TagUpdate) ‑> coolipy._response.CoolipyAPIResponse[Tag]
Expand source code
def update(self, uuid: str, model: TagUpdate) -> CoolipyAPIResponse[Tag]:
    """Update a tag by UUID."""
    return self._patch(f"/tags/{uuid}", json=_dump(model), response_model=Tag)

Update a tag by UUID.