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
2 changes: 1 addition & 1 deletion scrapegraph-py/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "scrapegraph_py"
version = "1.12.2"
version = "1.12.3"
description = "ScrapeGraph Python SDK for API"
authors = [
{ name = "Marco Vinciguerra", email = "marco@scrapegraphai.com" },
Expand Down
14 changes: 14 additions & 0 deletions scrapegraph-py/scrapegraph_py/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
>>> asyncio.run(main())
"""
import asyncio
import warnings
from typing import Any, Dict, Optional, Callable

from aiohttp import ClientSession, ClientTimeout, TCPConnector
Expand Down Expand Up @@ -173,6 +174,19 @@ def __init__(
"""
logger.info("🔑 Initializing AsyncClient")

warnings.warn(
"scrapegraph-py v1.x is deprecated and will be removed in a future release. "
"Please upgrade to scrapegraph-py v2.x for the new API surface. "
"See migration guide: https://docs.scrapegraphai.com/transition-from-v1-to-v2",
DeprecationWarning,
stacklevel=2,
)
logger.warning(
"scrapegraph-py v1.x is deprecated and will be removed in a future release. "
"Please upgrade to scrapegraph-py v2.x for the new API surface. "
"Migration guide: https://docs.scrapegraphai.com/transition-from-v1-to-v2"
)

# Try to get API key from environment if not provided
if api_key is None:
from os import getenv
Expand Down
14 changes: 14 additions & 0 deletions scrapegraph-py/scrapegraph_py/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
... result = client.scrape(website_url="https://example.com")
"""
import uuid as _uuid
import warnings
from typing import Any, Callable, Dict, Optional
from urllib.parse import urlparse

Expand Down Expand Up @@ -178,6 +179,19 @@ def __init__(
"""
logger.info("🔑 Initializing Client")

warnings.warn(
"scrapegraph-py v1.x is deprecated and will be removed in a future release. "
"Please upgrade to scrapegraph-py v2.x for the new API surface. "
"See migration guide: https://docs.scrapegraphai.com/transition-from-v1-to-v2",
DeprecationWarning,
stacklevel=2,
)
logger.warning(
"scrapegraph-py v1.x is deprecated and will be removed in a future release. "
"Please upgrade to scrapegraph-py v2.x for the new API surface. "
"Migration guide: https://docs.scrapegraphai.com/transition-from-v1-to-v2"
)

# Try to get API key from environment if not provided
if api_key is None:
from os import getenv
Expand Down
Loading