Python SQL Query Engine for Serverless Environments
Project description
Query your data, where it lives.
Opteryx is a SQL Engine written in Python, designed for cloud-native environments.
Documentation | Examples | Contributing
Use Cases
- Using SQL to query data written by another process, such as logs
- As a command line tool - bring the power and flexibility of SQL to filter and transform files
- As an embeddable engine - a low-cost option to allow hundreds of analysts to each have part-time databases
Features
-
Instant Elasticity
Designed to run in Knative and similar environments like Google Cloud Run, Opteryx can scale down to zero, and scale up to respond to thousands of concurrent queries within seconds.
-
High Availability
Shared Nothing/Shared Disk design means each query can run in a separate container instance making it nearly impossible for a rogue query to affect any other users. (compute and storage can be shared)
If a cluster, region or datacentre is unavailable, if you have instances able to run in another location, Opteryx will keep responding to queries. (inflight queries may not be recovered)
-
Query In Place
With Opteryx, if the engine can see and understand the data you can run queries against it. Saving you from the cost and effort of maintaining duplicates your data into a common store.
You can store your data in parquet files on disk or Cloud Storage, and in MongoDB or Firestore and access all of these data in the same query.
-
Bring your own Files
Opteryx supports many popular data formats, including Parquet, ORC, Feather and JSONL, stored on local disk or on Cloud Storage. You can mix-and-match formats, so one dataset can be Parquet and another JSONL, and Opteryx will be able to JOIN across them.
-
Consumption-Based Billing Friendly
Opteryx is well-suited for deployments to environments which are pay-as-you-use, like Google Cloud Run. Great for situations where you low-volume usage, or many environments, where the costs of many traditional database deployment can quickly add up.
-
Python Native
Opteryx is an Open Source Python library, it quickly and easily integrates into Python code, including Jupyter Notebooks, so you can start querying your data within a few minutes.
-
Time Travel
Designed for data analytics in environments where decisions need to be replayable, Opteryx allows you to query data as at a point in time in the past to replay decision algorithms against facts as they were known in the past. (data must be structured to enable temporal queries)
-
Schema Evolution
Opteryx supports some change to schemas and paritioning without requiring any existing data to be updated. (data types can only be changed to compatitble types)
Try Opteryx
Install from PyPI
pip install opteryx
Query Data (Command Line)
Example usage, filtering one of the internal example datasets and saving the results as a CSV.
python -m opteryx --o 'planets.csv' "SELECT * FROM \$planets"
Query Data (Python)
Example usage, querying one of the internal example datasets.
import opteryx
conn = opteryx.connect()
cur = conn.cursor()
cur.execute("SELECT 4 * 7;")
print(cur.fetchone())
For more example usage, see Exmaple Notebooks and the Getting Started Guide.
Community
How do I get Support?
For support join our Gitter Community.
How Can I Contribute?
All contributions, bug reports, documentation improvements, enhancements, and ideas are welcome.
Want to help build Opteryx? See the Contribution and Set Up Guides.
Security
See the project Security Policy for information about reporting vulnerabilities.
License
Opteryx is licensed under Apache 2.0.
Status
Opteryx is in beta. Beta means different things to different people, to us, being beta means:
- Core functionality has good regression test coverage to help ensure stability
- Some edge cases may have undetected bugs
- Performance tuning may be incomplete
- Changes are focused on feature completion, bugs, performance, reducing debt, and security
- Code structure and APIs are not stable and may change
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for opteryx-0.5.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24e4a4c62cf239df68941f180c07601d4eb5fea3f6ed56ed23735f72a3abacb9 |
|
MD5 | aeb8325fed2e2b8dafe98571d1734c2c |
|
BLAKE2b-256 | 2129a73f5bd9e6a78800e1bbcb0721c50d690c8de7be62cde6e4b9f12ce265ad |
Hashes for opteryx-0.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | db20f37f5152700aaa0a959ba76b95cdf72cd07a069e048aa86cd0e3ad25a60c |
|
MD5 | e1370e1f5791610f10d62a69e84be08e |
|
BLAKE2b-256 | 52f4b67b77ef793d2a184316916a1c568f7714733964a49b213cff40699359ef |
Hashes for opteryx-0.5.0-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bb263b6878fc68248596b00a23c3f14d169969077a8a36f00de01f3c0486d34 |
|
MD5 | 3e00838a70427bb25ba4f1af71c138ef |
|
BLAKE2b-256 | 12106d451b274c431cd76d33aa50be4a540e1e253927311771ca1c8a5461492a |
Hashes for opteryx-0.5.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3205cdc057c390fde70c6891fa656a0b4538ea9b7933887c740ecd3f6f67d26f |
|
MD5 | 0039a04a217f02d1c7690b97a07a11c2 |
|
BLAKE2b-256 | 175cf4e69d58a2f60ea9cc418ce47c51478fd2be67c1b752ae675ff01df82874 |
Hashes for opteryx-0.5.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 336b2604583baac369eb89cd0b79c2791740bf23585720bcbe110ad30cb5d136 |
|
MD5 | 13f4473a8926c42dd556e11b30c2e59c |
|
BLAKE2b-256 | dee9ba70a156b6eb2acbc1fc7067bd7835aa42b1472059cf93592d0f359770bb |
Hashes for opteryx-0.5.0-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ade38bda585551428a3b399f983adb20194c8a3a0f9e6fad1ae6df674caaa2aa |
|
MD5 | 1652ee8d4cd2841837f8ca40ce4c627b |
|
BLAKE2b-256 | d964b2dd87ef0308ab4619fba99d8c8f7bc28ad99bf955eeda1ce49e77556144 |
Hashes for opteryx-0.5.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18892ef813031d25bda625dad354e1fdbea90f3d675c2496c9e91c05130d7818 |
|
MD5 | 75674308b15c75fe95d4156f62119a39 |
|
BLAKE2b-256 | c2d0390bfe3e79615496b0ca75380ea0e2e6f8fa1b880901538682c8148fdef7 |
Hashes for opteryx-0.5.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 025b228afa880b68a40dcf6a8a576a3dc1e8492c7c8b85667d3f5c943e6996ac |
|
MD5 | a3cd2142126229e7376d878fc4bf0d83 |
|
BLAKE2b-256 | 3a7e242236e4271324dd21ffa864852412894cfbf177fc2e7a67e1b1103e3593 |
Hashes for opteryx-0.5.0-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 458a9f10d950a68be562ecfacc63bdc2bb6a640961a680d558c4f43ce77611c2 |
|
MD5 | 3f37315af99feca39f6a9bb78f7ba105 |
|
BLAKE2b-256 | d0b753ce6dd680e94678878468d38e3a83b8e51460c1f2e58f15a0e8b6b8604b |