Scraping
In [ ]:
Copied!
import httpx
transport = httpx.AsyncHTTPTransport(retries=2)
limits = httpx.Limits(max_connections=None)
timeout = httpx.Timeout(connect=60.0, read=300, write=60, pool=None)
async with httpx.AsyncClient(
transport=transport, limits=limits, timeout=timeout
) as client:
pass
import httpx
transport = httpx.AsyncHTTPTransport(retries=2)
limits = httpx.Limits(max_connections=None)
timeout = httpx.Timeout(connect=60.0, read=300, write=60, pool=None)
async with httpx.AsyncClient(
transport=transport, limits=limits, timeout=timeout
) as client:
pass
In [1]:
Copied!
from great_ai import configure, RouteConfig
from great_ai import GreatAI
@GreatAI.create
def greeter(your_name: str) -> str:
return f"Hi {your_name}"
greeter("Bob")
from great_ai import configure, RouteConfig
from great_ai import GreatAI
@GreatAI.create
def greeter(your_name: str) -> str:
return f"Hi {your_name}"
greeter("Bob")
2022-07-11 19:00:27 | WARNING | Environment variable ENVIRONMENT is not set, defaulting to development mode ‼️ 2022-07-11 19:00:27 | WARNING | Cannot find credentials files, defaulting to using ParallelTinyDbDriver 2022-07-11 19:00:27 | WARNING | The selected tracing database (ParallelTinyDbDriver) is not recommended for production 2022-07-11 19:00:27 | WARNING | Cannot find credentials files, defaulting to using LargeFileLocal 2022-07-11 19:00:27 | INFO | GreatAI (v0.1.3): configured ✅ 2022-07-11 19:00:27 | INFO | 🔩 tracing_database: ParallelTinyDbDriver 2022-07-11 19:00:27 | INFO | 🔩 large_file_implementation: LargeFileLocal 2022-07-11 19:00:27 | INFO | 🔩 is_production: False 2022-07-11 19:00:27 | INFO | 🔩 should_log_exception_stack: True 2022-07-11 19:00:27 | INFO | 🔩 prediction_cache_size: 512 2022-07-11 19:00:27 | INFO | 🔩 dashboard_table_size: 50 2022-07-11 19:00:27 | WARNING | You still need to check whether you follow all best practices before trusting your deployment. 2022-07-11 19:00:27 | WARNING | > Find out more at https://se-ml.github.io/practices
Out[1]:
Trace[str]({'created': '2022-07-11T17:00:27.064568',
'exception': None,
'feedback': None,
'logged_values': {'arg:your_name:length': 3, 'arg:your_name:value': 'Bob'},
'models': [],
'original_execution_time_ms': 0.0896,
'output': 'Hi Bob',
'tags': ['greeter', 'online', 'development'],
'trace_id': '8ff5b268-2613-4e85-96ae-f248666a051f'})
Last update:
July 11, 2022