This release is a pre-release and may not be stable for production use.
Palo Alto Networks Cortex™ Data Lake SDK
Python idiomatic SDK for the Cortex™ Data Lake.
The Palo Alto Networks Cortex Data Lake Python SDK was created to assist developers with programmatically interacting with the Palo Alto Networks Cortex™ Data Lake API.
The primary goal is to provide full, low-level API coverage for the following Cortex™ Data Lake services:
- Query Service
The secondary goal is to provide coverage, in the form of helpers, for common tasks/operations.
-
Log/event pagination
-
OAuth 2.0 and token refreshing
-
More, coming soon!
-
Documentation: https://cortex.pan.dev
-
Free software: ISC license
Features
- HTTP client wrapper for the popular Requests library with full access to its features.
- Language bindings for Query Service.
- Helper methods for performing common tasks, such as log/event pagination.
- Support for OAuth 2.0 grant code authorization flow.
- Library of example scripts illustrating how to leverage the SDK.
- Support for API Explorer Developer Tokens for easier access to API!
Status
The Palo Alto Networks Cortex™ Data Lake Python SDK is considered alpha at this time.
Installation
From PyPI:
$ pip install pan-cortex-data-lake
Obtaining and Using OAuth 2.0 Tokens
If you're an app developer, work with your Developer Relations representative to obtain your OAuth2 credentials. API Explorer may optionally be used to generate a Developer Token, which can also be used to authenticate with the API. For details on API Explorer developer tokens, please visit https://cortex.pan.dev/docs/learn/developer_tokens.
Example
>>> from pan_cortex_data_lake import Credentials, QueryService
>>> c = Credentials()
>>> qs = QueryService(credentials=c)
>>> query_params = {
... "query": "SELECT * FROM `1234567890.firewall.traffic` LIMIT 1",
... }
>>> q = qs.create_query(query_params=query_params)
>>> q.status_code
201
>>> q.json()
{'jobId': '40fedce6-ddf5-44cf-9af2-7c3d5303f388', 'uri': '/query/v2/jobs/40fedce6-ddf5-44cf-9af2-7c3d5303f388'}
>>> results = qs.get_job_results(job_id='40fedce6-ddf5-44cf-9af2-7c3d5303f388')
>>> results.json()
Contributors
Metadata
Release files for pan-cortex-data-lake 2.0.0b1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pan-cortex-data-lake-2.0.0b1.tar.gz | 26.2 kB | Without provenance | Details for pan-cortex-data-lake-2.0.0b1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pan_cortex_data_lake-2.0.0b1-py3-none-any.whl | Python 3 | none | any | Details for pan_cortex_data_lake-2.0.0b1-py3-none-any.whl |
Total release size: 44.3 kB
Release files / pan-cortex-data-lake-2.0.0b1.tar.gz
| Download URL | pan-cortex-data-lake-2.0.0b1.tar.gz |
|---|---|
| Size | 26.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5cba1c32a762e36d19eb991b110152c618091bf540cd379245d9dbf6504a5e95
|
|
BLAKE2b-256 checksum How to use checksums |
1d67d76a0f0b45885e33c08c77216e967781fcef2cdd4ef317e306b21762fcaf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.26.0
|
Release files / pan_cortex_data_lake-2.0.0b1-py3-none-any.whl
| Download URL | pan_cortex_data_lake-2.0.0b1-py3-none-any.whl |
|---|---|
| Size | 18.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a22712cd89f755ed92f89bea3aacd1c72077a0065cee336132947216621b58cd
|
|
BLAKE2b-256 checksum How to use checksums |
2f8a8ad80f1ed4ba6648dc8cdfe672bda86173a11c9ca25195f83532cb707930
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.26.0
|
Security for pan-cortex-data-lake 2.0.0b1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.