Skip to main content

Euno SDK

Euno's CLI library to programmatically interact with Euno instance

Installation

pip install euno-sdk

Quick Start

As a Library

import euno

# Hello world function
message = euno.hello_world("Euno")
print(message)  # Output: Hello, Euno! Welcome to the Euno SDK!

# List resources from your Euno instance
resources = euno.list_resources()
print(f"Found {resources['count']} resources")

# List resources with custom parameters
resources = euno.list_resources(
    properties="uri,type,name,description",
    page_size=10
)

# List resources with EQL query
resources = euno.list_resources(
    eql="type='table'",
    properties="uri,name"
)

# List metadata tags (custom properties)
metadata_tags = euno.list_metadata_tags()
print(f"Found {len(metadata_tags)} metadata tags")

# Set values for a metadata tag
value_updates = [
    {"resource_uri": "table://schema.table1", "value": "production"},
    {"resource_uri": "table://schema.table2", "value": "staging"}
]
result = euno.set_metadata_tag_value(123, value_updates)
print(f"Updated {result.get('updated_count', 0)} values")

As a CLI Tool

# Hello world command
euno hello-world --name Euno

# Show version
euno version

# Show help
euno --help

Source Crawl Freshness

The SDK exposes GET /accounts/{account_id}/integrations and GET /accounts/{account_id}/integrations/{source_id}. Both require the view_sources permission.

import euno

sources = euno.list_sources(page=1, page_size=20)
source = euno.get_source(sources[0]["id"])
euno sources list
euno sources list --format csv
euno sources list --format pretty
euno sources get 123
euno sources get 123 --format pretty

List output supports JSON, CSV, and pretty formats. Get output supports JSON and pretty formats. The freshness fields include:

  • schedule: the configured crawl schedule.
  • next_scheduled_run_at: the scheduler's next planned attempt, or null when unavailable.
  • last_run_status: the latest/current crawl status.
  • last_completed_run_end_time: the end time of the last successful crawl.
  • last_time_triggered: the start time of the latest scheduled or manual attempt.
  • health: healthy, unhealthy, or pending.
  • active: whether the source is enabled.

The list API returns one page at a time. Use page and page_size in Python or --page and --page-size in the CLI.

Development

Setup Development Environment

# Clone the repository
git clone https://github.com/euno-ai/euno-sdk.git
cd euno-sdk

# Install development dependencies
pip install -r requirements-dev.txt

# Install the package in development mode
pip install -e .

Running Tests

pytest

Code Formatting

black euno tests

Type Checking

mypy euno

API Reference

Core Functions

hello_world(name: str = "World") -> str

A simple hello world function to demonstrate the SDK.

Parameters:

  • name (str): The name to greet (default: "World")

Returns:

  • str: A greeting message

Example:

from euno import hello_world

message = hello_world("Euno")
print(message)  # Output: Hello, Euno! Welcome to the Euno SDK!

get_version() -> str

Get the current version of the Euno SDK.

Returns:

  • str: The version string

Example:

from euno import get_version

version = get_version()
print(version)  # Output: 0.2.0

CLI Commands

euno hello-world

A simple hello world command to demonstrate the CLI.

Options:

  • --name, -n: Name to greet (default: "World")

Example:

euno hello-world --name Euno

euno version

Show the version of the Euno SDK.

Example:

euno version

euno init

Initialize the Euno SDK with your API token.

This command will prompt you for your Euno API token and validate it against the Euno backend. The token will be stored securely for future use.

Example:

euno init

Configuration:

  • You can override the stored token by setting the EUNO_TOKEN environment variable
  • You can override the stored account ID by setting the EUNO_ACCOUNT environment variable

euno status

Show the current configuration status.

Displays information about the current configuration including backend URL, token status, and user information.

Example:

euno status

euno logout

Clear the stored configuration and log out.

This will remove the stored API token and require you to run 'euno init' again to authenticate.

Example:

euno logout

euno resources list

List resources from the Euno data model.

Options:

  • --eql, -e: Euno Query Language expression
  • --properties, -p: Comma-separated list of properties (default: uri,type,name)
  • --page: Page number (default: 1)
  • --page-size: Number of resources per page (default: 50)
  • --sorting, -s: Sorting specification
  • --relationships, -r: Comma-separated list of relationships
  • --format, -f: Output format - json, csv, or pretty (default: json)

Examples:

euno resources list
euno resources list --eql "type='table'" --properties "uri,name" --format pretty
euno resources list --relationships "parent,child" --page-size 20

euno metadata-tags list

List all metadata tags (custom properties) for the configured account.

Options:

  • --format, -f: Output format - json, csv, or pretty (default: json)

Examples:

euno metadata-tags list
euno metadata-tags list --format pretty
euno metadata-tags list --format csv

euno metadata-tags set-value

Set values for a metadata tag (custom property).

Arguments:

  • CP_ID: The custom property ID
  • VALUE_UPDATES: JSON string containing the value updates

Options:

  • --format, -f: Output format - json or pretty (default: json)

Examples:

euno metadata-tags set-value 123 '[{"resource_uri": "table://schema.table", "value": "production"}]'
euno metadata-tags set-value 456 '[{"resource_uri": "table://schema.table", "value": "production"}]' --format pretty

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for your changes
  5. Run the test suite
  6. Submit a pull request

Development Setup

# Clone the repository
git clone https://github.com/euno-ai/euno-sdk.git
cd euno-sdk

# Install development dependencies
pip install -r requirements-dev.txt

# Install the package in development mode
pip install -e .

# Install pre-commit hooks
pre-commit install

Running Tests

# Run all tests
make test

# Run tests with coverage
pytest tests/ -v --cov=euno --cov-report=html

# Run specific test file
pytest tests/test_euno.py -v

Code Quality

# Format code
make format

# Run linting
make lint

# Type checking
make type-check

# Run all quality checks
make lint && make type-check

GitHub Actions

This repository uses GitHub Actions for continuous integration:

  • CI: Runs tests on Python 3.8-3.12, linting, type checking, and builds
  • Pre-commit: Ensures code quality with pre-commit hooks
  • Publish: Automatically publishes to PyPI when a release is created

See .github/README.md for detailed workflow documentation.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for euno 0.6.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for euno 0.6.2
File Size Uploaded Provenance Actions
euno-0.6.2.tar.gz 34.4 kB Without provenance Details for euno-0.6.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for euno 0.6.2
File Interpreter ABI Platform Actions
euno-0.6.2-py3-none-any.whl Python 3 none any Details for euno-0.6.2-py3-none-any.whl

Total release size: 56.2 kB

Release files / euno-0.6.2.tar.gz

Download URL euno-0.6.2.tar.gz
Size 34.4 kB
Tags Source
SHA-256 checksum
How to use checksums
573b673a2e9d24ab645f91f304b987457eeb0c2407445daed04bfba54b65e3a1
BLAKE2b-256 checksum
How to use checksums
d945d873bf4b09142214a591972e1a4e7db02da32acf1259f4e2559b12808b51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.15

Release files / euno-0.6.2-py3-none-any.whl

Download URL euno-0.6.2-py3-none-any.whl
Size 21.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
505e7040988a07bc079a562807def66813664e5bc67a8b54a33b43e855cfb0ab
BLAKE2b-256 checksum
How to use checksums
b5aae93404f72775152ddf9c9f59bcb86b629121556eeadb038cf9fb1e3111cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.15

Security for euno 0.6.2

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page