Arctic Security Library
A Python library to access Arctic Security's Sharing API endpoints and retrieve event data.
Installation
pip install arcticsecurity
Python >= 3.9 is required.
Quick Start
The library supports two distinct ways to retrieve events from the Sharing API: Query and Sync.
Query
Use the Query class to perform one-off queries for specific events.
from arcticsecurity.sharing_api import Query
url = "https://example.com/shares/v2/share-id?apikey=YOUR_API_KEY"
for event in Query(url).query(filter='"network owner"="Example Co"', max_events=50):
print(event)
Sync
Use the Sync class to reliably synchronize all event data. It uses pagination with opaque continuation tokens to ensure no events are missed.
Here Sync means keeping your own copy of the events synchronized. It is unrelated to the Sharing API's synchronous endpoints: both classes use the asynchronous ones.
from arcticsecurity.sharing_api import Sync
url = "https://example.com/shares/v2/share-id?apikey=YOUR_API_KEY"
sync = Sync(url, filter='"network owner"="Example Co"')
# Load the token stored by the previous run, or None on the first run
token = None
while True:
res = sync.read(token=token, pagesize=1000)
# process res.events...
# res.token is None when the server reported no position; keep the old one
if res.token is not None:
token = res.token
if not res.has_more:
break
# store the token for the next run
Common features
- Robust error handling with specific exceptions (
ConfigError,AuthError,NetworkError,Retry,TimeoutError,InvalidTokenError,ServerError). - Optional timeout and user-agent customization
Versioning
Follows Semantic Versioning v2.
Development
uv is required.
uv sync --group dev
uv run ruff check .
uv run pytest --doctest-modules
uv run mypy --config-file pyproject.toml -p arcticsecurity
uv run ty check
uv run mkdocs build
uv run mkdocs serve
Contributing
Issues and pull requests are welcome. Please add tests for any new behavior.
Status
Experimental (0.1.x); the API may evolve. Pin the library version for production use.
Metadata
Release files for arcticsecurity 0.2.0
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 | |
|---|---|---|---|---|
| arcticsecurity-0.2.0.tar.gz | 12.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| arcticsecurity-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 28.8 kB
Release files / arcticsecurity-0.2.0.tar.gz
| Download URL | arcticsecurity-0.2.0.tar.gz |
|---|---|
| Size | 12.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3c93d5982da57dee32e9e7567dea1000a84dfd17f1f2ce57b1368fcd446c3362
|
|
BLAKE2b-256 checksum How to use checksums |
41ef03bcaec261fb14888dff338aa976832d034f02bd1be213e0fe6199822e02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / arcticsecurity-0.2.0-py3-none-any.whl
| Download URL | arcticsecurity-0.2.0-py3-none-any.whl |
|---|---|
| Size | 15.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
454fe5cb64d580cbdec4e1a0634a790ecb2b553ba267e2ebe5a0d409d2e128e1
|
|
BLAKE2b-256 checksum How to use checksums |
214c776abf302968b0fdabe1c2e76510167c1f44063cc596852e4e4f437f4992
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for arcticsecurity 0.2.0
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.