Registry / devops / spotinst-agent

spotinst-agent

JSON →
library1.1.260pypypi✓ verified 24d ago

The `spotinst-agent` is a Python-based executor designed as a spectrum instance agent. Its primary function is to run remote scripts, collect data, and deploy applications on machines using a polling architecture. It's an active project, with version 1.1.260 released in June 2024, and appears to follow a regular release cadence.

pip install spotinst-agent
INSTALL
IMPORT
SIG · SPOTINST-AGENT
S
spotinst-agent
devopspythonv1.1.260
Install
3.2s avg
Import
Disk
23MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.1.260 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 24.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.2s · import 0.000s · 26MB
23MB installed
● package 23MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

spotinst-agent
The `spotinst-agent` package is primarily an executable agent/service, not typically imported directly as a Python library for programmatic interaction. Its functionality is exposed via deployment and configuration rather than a Python API.
This package is designed as a deployed agent, configured via YAML files, rather than a library for direct programmatic import and use within other Python applications. For API interaction with Spotinst services, consider `spotinst-sdk` or `spotinst-sdk2`.

The `spotinst-agent` is primarily installed and deployed as a service, with its behavior configured through YAML files rather than direct Python API calls. The quickstart focuses on installation and a conceptual understanding of its operation. For programmatic interaction with Spotinst services, users should refer to the `spotinst-sdk` or `spotinst-sdk2` libraries.

# Install the agent pip install spotinst-agent # The Spotinst agent is typically run as a service or within a container. # Its configuration is handled via YAML files (e.g., 'agent.yml') and worker configurations. # Direct Python code interaction for 'spotinst-agent' itself is uncommon. # # Example of how you might *start* the agent process (conceptual, actual command depends on deployment): # This usually involves running a command-line utility or daemonizing a script provided by the package. # For example, if it had a main entry point: # python -m spotinst_agent.main --config /path/to/agent.yml # # For interacting with Spotinst APIs programmatically, use the Spotinst SDK: # import os # from spotinst_sdk import SpotinstClient # # # Authenticate using environment variables (recommended for quickstart) # # export SPOTINST_TOKEN='YOUR_SPOTINST_API_TOKEN' # # export SPOTINST_ACCOUNT='YOUR_SPOTINST_ACCOUNT_ID' # # client = SpotinstClient( # auth_token=os.environ.get('SPOTINST_TOKEN', 'YOUR_SPOTINST_API_TOKEN'), # account_id=os.environ.get('SPOTINST_ACCOUNT', 'YOUR_SPOTINST_ACCOUNT_ID') # ) # # Example: fetch all Elastigroups (this requires spotinst-sdk, not spotinst-agent) # # elastigroups = client.get_all_elastigroups() # # print(elastigroups)
Debug
Known issues
gotchaThe `spotinst-agent` PyPI package was uploaded using `CPython/2.7.18` and does not explicitly declare a `requires_python` version. This suggests it might have been developed for or is compatible with Python 2.7, which is end-of-life. Users on modern Python 3 environments should test compatibility carefully, as other Spotinst Python libraries (like `spotinst-sdk2`) require Python 3.7+.
fix
Ensure your environment's Python version is compatible. Consider using a dedicated virtual environment. For new projects, evaluate if `spotinst-sdk` or `spotinst-sdk2` (which are Python 3-native) better suit your needs for API interaction.
affects: <=1.1.260
gotchaThe `spotinst-agent` is a configuration-driven service, relying on YAML files like `agent.yml` for global settings and specific worker configurations. Misconfigurations in these files are a common source of operational issues, rather than code-level errors.
fix
Thoroughly review the agent's documentation for correct YAML configuration syntax and best practices. Use version control for configuration files and validate them before deployment.
affects: All versions
gotchaUsers often confuse `spotinst-agent` with the `spotinst-sdk` or `spotinst-sdk2` Python libraries. `spotinst-agent` is a deployed service for executing scripts, while the SDKs provide programmatic access to Spotinst (now Spot) APIs for managing cloud resources.
fix
Clearly define your use case: if you need to manage Spotinst resources programmatically, use `spotinst-sdk` or `spotinst-sdk2`. If you need an agent running on an instance to perform tasks, `spotinst-agent` is the correct package.
affects: All versions
gotchaAuthentication for Spotinst services (including potentially the agent's internal operations or related tools like `spotctl`) often relies on a specific precedence for credentials: parameters in a client object, environment variables (`SPOTINST_TOKEN`, `SPOTINST_ACCOUNT`), or a shared credentials file (`~/.spotinst/credentials`). Incorrectly set or conflicting credentials can lead to authentication failures.
fix
Follow the documented credential precedence. For quick setups, use environment variables (`export SPOTINST_TOKEN=...`, `export SPOTINST_ACCOUNT=...`). For production, consider using a shared credentials file or IAM roles where applicable.
affects: All versions
Upgrade
Version history
1.1.260latest on PyPI · released Jun 23, 2024
Audit
Dependencies

No dependency data recorded yet.

Agent activity
21 hits · last 30 days
node
18
Resources
spotinst-agent — pip install spotinst-agent · libregistry