Euno's CLI library to programmatically interact with Euno instance
Project description
Euno SDK
Euno's CLI library to programmatically interact with Euno instance
Installation
pip install euno-sdk
Quick Start
As a Library
from euno import hello_world
# Use the hello_world function
message = hello_world("Euno")
print(message) # Output: Hello, Euno! Welcome to the Euno SDK!
As a CLI Tool
# Hello world command
euno hello-world --name Euno
# Show version
euno version
# Show help
euno --help
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_TOKENenvironment variable - You can override the stored account ID by setting the
EUNO_ACCOUNTenvironment 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
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for your changes
- Run the test suite
- 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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file euno-0.2.0.tar.gz.
File metadata
- Download URL: euno-0.2.0.tar.gz
- Upload date:
- Size: 21.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7d6884375a61506877eba558717aadb47c77ebe822141a982b0109c28aaf576
|
|
| MD5 |
062cee805868784924471df4107ab345
|
|
| BLAKE2b-256 |
0c458b23b5fc9695a9941fd6c0c5665d266a38aec32104d4d1f461ae53e9ab64
|
File details
Details for the file euno-0.2.0-py3-none-any.whl.
File metadata
- Download URL: euno-0.2.0-py3-none-any.whl
- Upload date:
- Size: 12.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e94e5a7aa44f12245b8b7961c2ad5ae143e7467cb1fb5f12bdc4333050e5780
|
|
| MD5 |
b5006c432cbe03f985f209d8746580ba
|
|
| BLAKE2b-256 |
22951ff17b008d8029f34840ccfc974ce036b3ccad979d9d751ab8e7a1de735d
|