Skip to content
Closed
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
31 changes: 19 additions & 12 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ requests = ">=2.32"
requests-oauthlib = { version = ">=1.2.0", optional = true}
certifi = "^2024.7.4"
urllib3 = ">=2.5"
asyncio = "^4.0.0"
httpx = "^0.28.1"
asyncio = { version = "^4.0.0", optional = true }
httpx = { version = "^0.28.1", optional = true }

[tool.poetry.extras]
oauth = ["requests-oauthlib"]
asyncio = ["asyncio", "httpx"]

[tool.poetry.group.dev.dependencies]
requests-oauthlib = ">=1.2.0"
Expand Down
12 changes: 8 additions & 4 deletions pysnc/asyncio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
Asynchronous implementation of the pysnc package using httpx.AsyncClient.
"""

from .client import AsyncTableAPI, AsyncBatchAPI, AsyncAttachmentAPI, AsyncServiceNowClient
from .record import AsyncGlideRecord
from .attachment import AsyncAttachment
from .auth import AsyncServiceNowFlow, AsyncServiceNowPasswordGrantFlow, AsyncServiceNowJWTAuth
try:
from .client import AsyncTableAPI, AsyncBatchAPI, AsyncAttachmentAPI, AsyncServiceNowClient
from .record import AsyncGlideRecord
from .attachment import AsyncAttachment
from .auth import AsyncServiceNowFlow, AsyncServiceNowPasswordGrantFlow, AsyncServiceNowJWTAuth
except ImportError:
raise ImportError("httpx is required for the asyncio module. Please install pysnc with the 'asyncio' extra.")


__all__ = [
'AsyncServiceNowClient',
Expand Down
Loading