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
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,18 @@ jobs:
run: rye build

- name: Get GitHub OIDC Token
if: github.repository == 'stainless-sdks/unlayer-python'
if: |-
github.repository == 'stainless-sdks/unlayer-python' &&
!startsWith(github.ref, 'refs/heads/stl/')
id: github-oidc
uses: actions/github-script@v8
with:
script: core.setOutput('github_token', await core.getIDToken());

- name: Upload tarball
if: github.repository == 'stainless-sdks/unlayer-python'
if: |-
github.repository == 'stainless-sdks/unlayer-python' &&
!startsWith(github.ref, 'refs/heads/stl/')
env:
URL: https://pkg.stainless.com/s
AUTH: ${{ steps.github-oidc.outputs.github_token }}
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.1.0"
".": "0.1.1"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 7
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/unlayer%2Funlayer-48f00d1c04c23fb4d1cb7cf4af4f56b0c920d758c1f06e06e5373e5b15e9c27d.yml
openapi_spec_hash: 6ee2a94bb9840aceb4a6161c724ce46c
config_hash: 249869757b6eb98ae3d58f2a47ce21e2
config_hash: c8d97d58d67dad9eeb65eb58fc781724
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## 0.1.1 (2026-03-07)

Full Changelog: [v0.1.0...v0.1.1](https://github.com/unlayer/unlayer-python/compare/v0.1.0...v0.1.1)

### Chores

* **ci:** skip uploading artifacts on stainless-internal branches ([907041a](https://github.com/unlayer/unlayer-python/commit/907041a9070f3c4a86605a21c9ab9a004a9bf553))
* **internal:** codegen related update ([d58e1b8](https://github.com/unlayer/unlayer-python/commit/d58e1b80f026a3fbb93c51e57af8afedcdb866e9))
* **internal:** make `test_proxy_environment_variables` more resilient to env ([caea803](https://github.com/unlayer/unlayer-python/commit/caea803e4fc873ade6fbc9b9b66ff67938780f65))
* **test:** do not count install time for mock server timeout ([3ad7bbb](https://github.com/unlayer/unlayer-python/commit/3ad7bbb203d27a7b7f69fda2d0f3aebea329c49e))


### Refactors

* **types:** use `extra_items` from PEP 728 ([19677f4](https://github.com/unlayer/unlayer-python/commit/19677f4a04cd989500eecce93cbb0506cf1ebf32))

## 0.1.0 (2026-02-24)

Full Changelog: [v0.0.1...v0.1.0](https://github.com/unlayer/unlayer-python/compare/v0.0.1...v0.1.0)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "unlayer"
version = "0.1.0"
version = "0.1.1"
description = "The official Python library for the unlayer API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
13 changes: 12 additions & 1 deletion scripts/mock
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,22 @@ echo "==> Starting mock server with URL ${URL}"

# Run prism mock on the given spec
if [ "$1" == "--daemon" ]; then
# Pre-install the package so the download doesn't eat into the startup timeout
npm exec --package=@stainless-api/[email protected] -- prism --version

npm exec --package=@stainless-api/[email protected] -- prism mock "$URL" &> .prism.log &

# Wait for server to come online
# Wait for server to come online (max 30s)
echo -n "Waiting for server"
attempts=0
while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do
attempts=$((attempts + 1))
if [ "$attempts" -ge 300 ]; then
echo
echo "Timed out waiting for Prism server to start"
cat .prism.log
exit 1
fi
echo -n "."
sleep 0.1
done
Expand Down
18 changes: 18 additions & 0 deletions src/unlayer/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,18 +115,21 @@ def convert(self) -> ConvertResource:

@cached_property
def projects(self) -> ProjectsResource:
"""Project details and configuration."""
from .resources.projects import ProjectsResource

return ProjectsResource(self)

@cached_property
def templates(self) -> TemplatesResource:
"""Template management and retrieval."""
from .resources.templates import TemplatesResource

return TemplatesResource(self)

@cached_property
def workspaces(self) -> WorkspacesResource:
"""Workspace access and management."""
from .resources.workspaces import WorkspacesResource

return WorkspacesResource(self)
Expand Down Expand Up @@ -345,18 +348,21 @@ def convert(self) -> AsyncConvertResource:

@cached_property
def projects(self) -> AsyncProjectsResource:
"""Project details and configuration."""
from .resources.projects import AsyncProjectsResource

return AsyncProjectsResource(self)

@cached_property
def templates(self) -> AsyncTemplatesResource:
"""Template management and retrieval."""
from .resources.templates import AsyncTemplatesResource

return AsyncTemplatesResource(self)

@cached_property
def workspaces(self) -> AsyncWorkspacesResource:
"""Workspace access and management."""
from .resources.workspaces import AsyncWorkspacesResource

return AsyncWorkspacesResource(self)
Expand Down Expand Up @@ -515,18 +521,21 @@ def convert(self) -> convert.ConvertResourceWithRawResponse:

@cached_property
def projects(self) -> projects.ProjectsResourceWithRawResponse:
"""Project details and configuration."""
from .resources.projects import ProjectsResourceWithRawResponse

return ProjectsResourceWithRawResponse(self._client.projects)

@cached_property
def templates(self) -> templates.TemplatesResourceWithRawResponse:
"""Template management and retrieval."""
from .resources.templates import TemplatesResourceWithRawResponse

return TemplatesResourceWithRawResponse(self._client.templates)

@cached_property
def workspaces(self) -> workspaces.WorkspacesResourceWithRawResponse:
"""Workspace access and management."""
from .resources.workspaces import WorkspacesResourceWithRawResponse

return WorkspacesResourceWithRawResponse(self._client.workspaces)
Expand All @@ -546,18 +555,21 @@ def convert(self) -> convert.AsyncConvertResourceWithRawResponse:

@cached_property
def projects(self) -> projects.AsyncProjectsResourceWithRawResponse:
"""Project details and configuration."""
from .resources.projects import AsyncProjectsResourceWithRawResponse

return AsyncProjectsResourceWithRawResponse(self._client.projects)

@cached_property
def templates(self) -> templates.AsyncTemplatesResourceWithRawResponse:
"""Template management and retrieval."""
from .resources.templates import AsyncTemplatesResourceWithRawResponse

return AsyncTemplatesResourceWithRawResponse(self._client.templates)

@cached_property
def workspaces(self) -> workspaces.AsyncWorkspacesResourceWithRawResponse:
"""Workspace access and management."""
from .resources.workspaces import AsyncWorkspacesResourceWithRawResponse

return AsyncWorkspacesResourceWithRawResponse(self._client.workspaces)
Expand All @@ -577,18 +589,21 @@ def convert(self) -> convert.ConvertResourceWithStreamingResponse:

@cached_property
def projects(self) -> projects.ProjectsResourceWithStreamingResponse:
"""Project details and configuration."""
from .resources.projects import ProjectsResourceWithStreamingResponse

return ProjectsResourceWithStreamingResponse(self._client.projects)

@cached_property
def templates(self) -> templates.TemplatesResourceWithStreamingResponse:
"""Template management and retrieval."""
from .resources.templates import TemplatesResourceWithStreamingResponse

return TemplatesResourceWithStreamingResponse(self._client.templates)

@cached_property
def workspaces(self) -> workspaces.WorkspacesResourceWithStreamingResponse:
"""Workspace access and management."""
from .resources.workspaces import WorkspacesResourceWithStreamingResponse

return WorkspacesResourceWithStreamingResponse(self._client.workspaces)
Expand All @@ -608,18 +623,21 @@ def convert(self) -> convert.AsyncConvertResourceWithStreamingResponse:

@cached_property
def projects(self) -> projects.AsyncProjectsResourceWithStreamingResponse:
"""Project details and configuration."""
from .resources.projects import AsyncProjectsResourceWithStreamingResponse

return AsyncProjectsResourceWithStreamingResponse(self._client.projects)

@cached_property
def templates(self) -> templates.AsyncTemplatesResourceWithStreamingResponse:
"""Template management and retrieval."""
from .resources.templates import AsyncTemplatesResourceWithStreamingResponse

return AsyncTemplatesResourceWithStreamingResponse(self._client.templates)

@cached_property
def workspaces(self) -> workspaces.AsyncWorkspacesResourceWithStreamingResponse:
"""Workspace access and management."""
from .resources.workspaces import AsyncWorkspacesResourceWithStreamingResponse

return AsyncWorkspacesResourceWithStreamingResponse(self._client.workspaces)
Expand Down
2 changes: 1 addition & 1 deletion src/unlayer/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "unlayer"
__version__ = "0.1.0" # x-release-please-version
__version__ = "0.1.1" # x-release-please-version
12 changes: 12 additions & 0 deletions src/unlayer/resources/convert/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@
class ConvertResource(SyncAPIResource):
@cached_property
def full_to_simple(self) -> FullToSimpleResource:
"""Design schema conversion between Full and Simple formats."""
return FullToSimpleResource(self._client)

@cached_property
def simple_to_full(self) -> SimpleToFullResource:
"""Design schema conversion between Full and Simple formats."""
return SimpleToFullResource(self._client)

@cached_property
Expand All @@ -56,10 +58,12 @@ def with_streaming_response(self) -> ConvertResourceWithStreamingResponse:
class AsyncConvertResource(AsyncAPIResource):
@cached_property
def full_to_simple(self) -> AsyncFullToSimpleResource:
"""Design schema conversion between Full and Simple formats."""
return AsyncFullToSimpleResource(self._client)

@cached_property
def simple_to_full(self) -> AsyncSimpleToFullResource:
"""Design schema conversion between Full and Simple formats."""
return AsyncSimpleToFullResource(self._client)

@cached_property
Expand Down Expand Up @@ -88,10 +92,12 @@ def __init__(self, convert: ConvertResource) -> None:

@cached_property
def full_to_simple(self) -> FullToSimpleResourceWithRawResponse:
"""Design schema conversion between Full and Simple formats."""
return FullToSimpleResourceWithRawResponse(self._convert.full_to_simple)

@cached_property
def simple_to_full(self) -> SimpleToFullResourceWithRawResponse:
"""Design schema conversion between Full and Simple formats."""
return SimpleToFullResourceWithRawResponse(self._convert.simple_to_full)


Expand All @@ -101,10 +107,12 @@ def __init__(self, convert: AsyncConvertResource) -> None:

@cached_property
def full_to_simple(self) -> AsyncFullToSimpleResourceWithRawResponse:
"""Design schema conversion between Full and Simple formats."""
return AsyncFullToSimpleResourceWithRawResponse(self._convert.full_to_simple)

@cached_property
def simple_to_full(self) -> AsyncSimpleToFullResourceWithRawResponse:
"""Design schema conversion between Full and Simple formats."""
return AsyncSimpleToFullResourceWithRawResponse(self._convert.simple_to_full)


Expand All @@ -114,10 +122,12 @@ def __init__(self, convert: ConvertResource) -> None:

@cached_property
def full_to_simple(self) -> FullToSimpleResourceWithStreamingResponse:
"""Design schema conversion between Full and Simple formats."""
return FullToSimpleResourceWithStreamingResponse(self._convert.full_to_simple)

@cached_property
def simple_to_full(self) -> SimpleToFullResourceWithStreamingResponse:
"""Design schema conversion between Full and Simple formats."""
return SimpleToFullResourceWithStreamingResponse(self._convert.simple_to_full)


Expand All @@ -127,8 +137,10 @@ def __init__(self, convert: AsyncConvertResource) -> None:

@cached_property
def full_to_simple(self) -> AsyncFullToSimpleResourceWithStreamingResponse:
"""Design schema conversion between Full and Simple formats."""
return AsyncFullToSimpleResourceWithStreamingResponse(self._convert.full_to_simple)

@cached_property
def simple_to_full(self) -> AsyncSimpleToFullResourceWithStreamingResponse:
"""Design schema conversion between Full and Simple formats."""
return AsyncSimpleToFullResourceWithStreamingResponse(self._convert.simple_to_full)
4 changes: 4 additions & 0 deletions src/unlayer/resources/convert/full_to_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@


class FullToSimpleResource(SyncAPIResource):
"""Design schema conversion between Full and Simple formats."""

@cached_property
def with_raw_response(self) -> FullToSimpleResourceWithRawResponse:
"""
Expand Down Expand Up @@ -91,6 +93,8 @@ def create(


class AsyncFullToSimpleResource(AsyncAPIResource):
"""Design schema conversion between Full and Simple formats."""

@cached_property
def with_raw_response(self) -> AsyncFullToSimpleResourceWithRawResponse:
"""
Expand Down
4 changes: 4 additions & 0 deletions src/unlayer/resources/convert/simple_to_full.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@


class SimpleToFullResource(SyncAPIResource):
"""Design schema conversion between Full and Simple formats."""

@cached_property
def with_raw_response(self) -> SimpleToFullResourceWithRawResponse:
"""
Expand Down Expand Up @@ -86,6 +88,8 @@ def create(


class AsyncSimpleToFullResource(AsyncAPIResource):
"""Design schema conversion between Full and Simple formats."""

@cached_property
def with_raw_response(self) -> AsyncSimpleToFullResourceWithRawResponse:
"""
Expand Down
4 changes: 4 additions & 0 deletions src/unlayer/resources/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@


class ProjectsResource(SyncAPIResource):
"""Project details and configuration."""

@cached_property
def with_raw_response(self) -> ProjectsResourceWithRawResponse:
"""
Expand Down Expand Up @@ -74,6 +76,8 @@ def retrieve(


class AsyncProjectsResource(AsyncAPIResource):
"""Project details and configuration."""

@cached_property
def with_raw_response(self) -> AsyncProjectsResourceWithRawResponse:
"""
Expand Down
4 changes: 4 additions & 0 deletions src/unlayer/resources/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@


class TemplatesResource(SyncAPIResource):
"""Template management and retrieval."""

@cached_property
def with_raw_response(self) -> TemplatesResourceWithRawResponse:
"""
Expand Down Expand Up @@ -148,6 +150,8 @@ def list(


class AsyncTemplatesResource(AsyncAPIResource):
"""Template management and retrieval."""

@cached_property
def with_raw_response(self) -> AsyncTemplatesResourceWithRawResponse:
"""
Expand Down
4 changes: 4 additions & 0 deletions src/unlayer/resources/workspaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@


class WorkspacesResource(SyncAPIResource):
"""Workspace access and management."""

@cached_property
def with_raw_response(self) -> WorkspacesResourceWithRawResponse:
"""
Expand Down Expand Up @@ -100,6 +102,8 @@ def list(


class AsyncWorkspacesResource(AsyncAPIResource):
"""Workspace access and management."""

@cached_property
def with_raw_response(self) -> AsyncWorkspacesResourceWithRawResponse:
"""
Expand Down
Loading