Skip to content

Commit d6738df

Browse files
authored
refactor!: declare private and public interface (#456)
### Description - declare private and public interface ### Issues - N/A ### Testing - All existing tests are passing. ### Checklist - [x] CI passed
1 parent 1c1ec64 commit d6738df

131 files changed

Lines changed: 462 additions & 444 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/examples/code/crawl_website_with_relative_links_all_links.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import asyncio
22

3+
from crawlee import EnqueueStrategy
34
from crawlee.beautifulsoup_crawler import BeautifulSoupCrawler, BeautifulSoupCrawlingContext
4-
from crawlee.enqueue_strategy import EnqueueStrategy
55

66

77
async def main() -> None:

docs/examples/code/crawl_website_with_relative_links_same_domain.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import asyncio
22

3+
from crawlee import EnqueueStrategy
34
from crawlee.beautifulsoup_crawler import BeautifulSoupCrawler, BeautifulSoupCrawlingContext
4-
from crawlee.enqueue_strategy import EnqueueStrategy
55

66

77
async def main() -> None:

docs/examples/code/crawl_website_with_relative_links_same_hostname.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import asyncio
22

3+
from crawlee import EnqueueStrategy
34
from crawlee.beautifulsoup_crawler import BeautifulSoupCrawler, BeautifulSoupCrawlingContext
4-
from crawlee.enqueue_strategy import EnqueueStrategy
55

66

77
async def main() -> None:

docs/examples/code/crawl_website_with_relative_links_same_origin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import asyncio
22

3+
from crawlee import EnqueueStrategy
34
from crawlee.beautifulsoup_crawler import BeautifulSoupCrawler, BeautifulSoupCrawlingContext
4-
from crawlee.enqueue_strategy import EnqueueStrategy
55

66

77
async def main() -> None:

docs/examples/code/fill_and_submit_web_form_crawler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import asyncio
22

3+
from crawlee import Request
34
from crawlee.http_crawler import HttpCrawler, HttpCrawlingContext
4-
from crawlee.models import Request
55

66

77
async def main() -> None:

docs/examples/code/fill_and_submit_web_form_request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from crawlee.models import Request
1+
from crawlee import Request
22

33
# Prepare a POST request to the form endpoint.
44
request = Request.from_url(

docs/introduction/code/08_routes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from crawlee.basic_crawler import Router
21
from crawlee.playwright_crawler import PlaywrightCrawlingContext
2+
from crawlee.router import Router
33

44
router = Router[PlaywrightCrawlingContext]()
55

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ playwright = ["playwright"]
9898
parsel = ["parsel"]
9999

100100
[tool.poetry.scripts]
101-
crawlee = "crawlee.cli:cli"
101+
crawlee = "crawlee._cli:cli"
102102

103103
[tool.ruff]
104104
line-length = 120

src/crawlee/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
from importlib import metadata
22

3+
from ._models import Request
4+
from ._types import ConcurrencySettings, EnqueueStrategy
35
from ._utils.globs import Glob
46

57
__version__ = metadata.version('crawlee')
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from .autoscaled_pool import AutoscaledPool
2+
from .snapshotter import Snapshotter
3+
from .system_status import SystemStatus
4+
5+
__all__ = ['AutoscaledPool', 'Snapshotter', 'SystemStatus']

0 commit comments

Comments
 (0)