{"id":23454,"library":"corva-sdk","title":"Corva Python SDK","description":"Python SDK for building Corva DevCenter apps. Provides event-driven app framework, API client, caching, logging, and data transformations for oil and gas data applications. Current version 2.1.1 (requires Python >=3.10, <4.0). Release cadence: irregular, with recent major bumps from v1 to v2.","status":"active","version":"2.1.1","language":"python","source_language":"en","source_url":"https://github.com/corva-ai/python-sdk","tags":["corva","oil-and-gas","sdk","events","api-client"],"install":[{"cmd":"pip install corva-sdk","lang":"bash","label":"From PyPI"}],"dependencies":[],"imports":[{"note":"Top-level package is 'corva', not 'corva_sdk'.","wrong":"from corva_sdk import App","symbol":"App","correct":"from corva import App"},{"note":"Cache is importable directly from corva.","wrong":"from corva.cache import Cache","symbol":"Cache","correct":"from corva import Cache"},{"note":"Event types are exposed at package level.","wrong":"from corva.models import ScheduledDataTimeEvent","symbol":"ScheduledDataTimeEvent","correct":"from corva import ScheduledDataTimeEvent"},{"note":"ApiClient is importable directly from corva.","wrong":"from corva.api import ApiClient","symbol":"ApiClient","correct":"from corva import ApiClient"}],"quickstart":{"code":"import os\nfrom corva import App, ScheduledDataTimeEvent, Cache, ApiClient\n\napp = App()\n\n@app.on_event(ScheduledDataTimeEvent)\ndef handler(event: ScheduledDataTimeEvent, cache: Cache, api: ApiClient):\n    data = {\"message\": \"Hello from Corva SDK\", \"asset_id\": event.asset_id}\n    return data\n\nif __name__ == \"__main__\":\n    app.run()","lang":"python","description":"Basic Corva app listening for scheduled data time events."},"warnings":[{"fix":"Use Python 3.10+ or pin corva-sdk<2.0.0.","message":"Version 2.0+ dropped support for Python <3.10. Upgrade your environment if still on Python 3.9.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Change imports to 'from corva import ...'.","message":"In v2, the import path 'from corva_sdk import ...' is invalid. All public APIs are under the 'corva' top-level package.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Use 'from corva import ScheduledDataTimeEvent' instead of 'from corva.models import ScheduledDataTimeEvent'.","message":"The 'corva.models' module is deprecated in v2. Event and model classes should be imported directly from 'corva'.","severity":"deprecated","affected_versions":">=2.0.0"},{"fix":"Design your handlers as synchronous functions. For concurrency, consider using corva's built-in threading support via 'concurrent' parameter if available.","message":"The SDK uses synchronous blocking I/O by default. Asynchronous handlers are not supported natively; use threads or run in separate processes.","severity":"gotcha","affected_versions":"all"},{"fix":"Manually manage cache keys using cache.delete() or implement a custom eviction strategy.","message":"The Cache object does not support TTL expiration automatically. Keys persist indefinitely unless explicitly deleted.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use 'import corva' or 'from corva import ...' (the package installed as corva-sdk is imported as corva).","cause":"Trying to import corva_sdk instead of corva.","error":"ModuleNotFoundError: No module named 'corva_sdk'"},{"fix":"Change to 'from corva import ScheduledDataTimeEvent'.","cause":"Using deprecated import path from corva.models.","error":"ImportError: cannot import name 'ScheduledDataTimeEvent' from 'corva.models'"},{"fix":"Ensure your app is configured with the correct event type in the DevCenter. Add a check: if event is None: return.","cause":"Event can be None if app type mismatch (e.g., using ScheduledDataTimeEvent on a real-time event).","error":"TypeError: 'NoneType' object is not subscriptable when accessing event.asset_id"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}