metadata_version string | name string | version string | summary string | description string | description_content_type string | author string | author_email string | maintainer string | maintainer_email string | license string | keywords string | classifiers list | platform list | home_page string | download_url string | requires_python string | requires list | provides list | obsoletes list | requires_dist list | provides_dist list | obsoletes_dist list | requires_external list | project_urls list | uploaded_via string | upload_time timestamp[us] | filename string | size int64 | path string | python_version string | packagetype string | comment_text string | has_signature bool | md5_digest string | sha256_digest string | blake2_256_digest string | license_expression string | license_files list | recent_7d_downloads int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2.4 | mkdocs-codeinclude-plugin | 0.3.1 | A plugin to include code snippets into mkdocs pages | # mkdocs-codeinclude-plugin
A plugin for mkdocs that allows some advanced 'includes' functionality to be used for embedded code blocks.
This is effectively an extended Markdown format, but is intended to degrade gracefully when rendered with a different renderer.
## Installation
1. Install the plugin:
```
pip install mkdocs-codeinclude-plugin
```
2. Add `codeinclude` to the list of your MkDocs plugins (typically listed in `mkdocs.yml`):
```yaml
plugins:
- codeinclude
```
3. The plugin should be configured use an appropriate form of tabbed fences, depending on the version of
[`pymdown-extensions`](https://github.com/facelessuser/pymdown-extensions) that is installed.
Tabbed fences provide a 'title' for code blocks, and adjacent code blocks will appear as a multi-tabbed code block.
a. For version 8.x of `pymdown-extensions`, use the following or leave blank (default):
```yaml
plugins:
- codeinclude:
title_mode: pymdownx.tabbed
```
b. For version 7.x or lower of `pymdown-extensions`, use the following:
```yaml
plugins:
- codeinclude:
title_mode: legacy_pymdownx.superfences
```
c. If you are using [`mkdocs-material`](https://squidfunk.github.io/mkdocs-material/reference/code-blocks/#adding-a-title), use the following:
```yaml
plugins:
- codeinclude:
title_mode: mkdocs-material
```
d. If no tabbed fences should be used at all:
```yaml
plugins:
- codeinclude:
title_mode: none
```
## Usage
A codeinclude block resembles a regular markdown link surrounded by a pair of XML comments, e.g.:
<!--
To prevent this from being rendered as a codeinclude when rendering this page, we use HTML tags.
See this in its rendered form to understand its actual appearance, or look at other pages in the
docs.
-->
<pre><code><!--codeinclude-->
[Human readable title for snippet](./relative_path_to_example_code.java) targeting_expression
<!--/codeinclude-->
</code></pre>
Where `targeting_expression` could be:
* `block:someString` or
* `inside_block:someString`
If these are provided, the macro will seek out any line containing the token `someString` and grab the next curly brace
delimited block that it finds. `block` will grab the starting line and closing brace, whereas `inside_block` will omit
these. If no `targeting_expression` is provided, the whole file is included.
e.g., given:
```java
public class FooService {
public void doFoo() {
foo.doSomething();
}
}
```
If we use `block:doFoo` as our targeting expression, we will have the following content included into our page:
```java
public void doFoo() {
foo.doSomething();
}
```
Whereas using `inside_block:doFoo` we would just have the inner content of the method included:
```java
foo.doSomething();
```
Note that:
* Any code included will be have its indentation reduced
* Every line in the source file will be searched for an instance of the token (e.g. `doFoo`). If more than one line
includes that token, then potentially more than one block could be targeted for inclusion. It is advisable to use a
specific, unique token to avoid unexpected behaviour.
* If the specified block is not found, behavior depends on the `block_throw` config value (see [Configuration](#configuration))
When we wish to include a section of code that does not naturally appear within braces, we can simply insert our token,
with matching braces, in a comment.
While a little ugly, this has the benefit of working in any context, even in languages that do not use
curly braces, and is easy to understand.
For example:
```java
public class FooService {
public void boringMethod() {
doSomethingBoring();
// doFoo {
doTheThingThatWeActuallyWantToShow();
// }
}
}
```
will be rendered as:
```java
doTheThingThatWeActuallyWantToShow();
```
## Configuration
This plugin takes two config values, specified in `mkdocs.yml`.
| Name | Description | Values | Default |
|---------------|---------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------|-------------------|
| `title_mode` | Controls how titles are generated for included blocks | `none`, `legacy_pymdownx.superfences`, `pymdownx.tabbed` | `pymdownx.tabbed` |
| `block_throw` | Controls whether to include entire file (`false`) or raise an error (`true`) if included block is not found in file | `true`, `false` | `false` |
## Building the Project
Install the dependencies:
```shell
pip install -r requirements.txt
pip install pytest # install pytest to run the tests
```
### Running tests
To run the tests:
```shell
pytest
```
### Formatting code
Code is formatted with Black. To apply formatting:
```shell
black codeinclude tests
```
| text/markdown | null | Richard North <rich.north@gmail.com> | null | null | null | mkdocs, python, markdown, codeinclude | [
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11"
] | [] | null | null | >=3.11 | [] | [] | [] | [
"mkdocs>=1.2",
"pygments>=2.9.0"
] | [] | [] | [] | [
"Homepage, https://github.com/rnorth/mkdocs-codeinclude-plugin"
] | uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","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} | 2026-02-20T19:11:57.694732 | mkdocs_codeinclude_plugin-0.3.1-py3-none-any.whl | 8,610 | 77/ec/fd55b2d0b5e98f002a4bb4ce2b0e6f146703b99a93378fc363e8d9d6ef3e/mkdocs_codeinclude_plugin-0.3.1-py3-none-any.whl | py3 | bdist_wheel | null | false | 546298be9754dcecf73efd72292023a0 | 443f32c9e4412b84ec084bd2b454020c5bf06cb9a958682e08a528e62b45da4d | 77ecfd55b2d0b5e98f002a4bb4ce2b0e6f146703b99a93378fc363e8d9d6ef3e | MIT | [
"LICENSE"
] | 250 |
2.4 | pico-ioc | 2.2.4 | A minimalist, zero-dependency Inversion of Control (IoC) container for Python. | # 📦 Pico-IoC: A Robust, Async-Native IoC Container for Python
[](https://pypi.org/project/pico-ioc/)
[](https://deepwiki.com/dperezcabrera/pico-ioc)
[](https://opensource.org/licenses/MIT)

[](https://codecov.io/gh/dperezcabrera/pico-ioc)
[](https://sonarcloud.io/summary/new_code?id=dperezcabrera_pico-ioc)
[](https://sonarcloud.io/summary/new_code?id=dperezcabrera_pico-ioc)
[](https://sonarcloud.io/summary/new_code?id=dperezcabrera_pico-ioc)
[](https://pepy.tech/projects/pico-ioc)
[](https://dperezcabrera.github.io/pico-ioc/)
[](https://dperezcabrera.github.io/learn-pico-ioc/)
**Pico-IoC** is a **lightweight, async-ready, decorator-driven IoC container** built for clarity, testability, and performance.
It brings Inversion of Control and dependency injection to Python in a deterministic, modern, and framework-agnostic way.
> 🐍 Requires Python 3.11+
---
## ⚖️ Core Principles
- Single Purpose – Do one thing: dependency management.
- Declarative – Use simple decorators (`@component`, `@factory`, `@provides`, `@configured`) instead of complex config files.
- Deterministic – No hidden scanning or side-effects; everything flows from an explicit `init()`.
- Async-Native – Fully supports async providers, async lifecycle hooks (`__ainit__`), and async interceptors.
- Fail-Fast – Detects missing bindings and circular dependencies at bootstrap (`init()`).
- Testable by Design – Use `overrides` and `profiles` to swap components instantly.
- Zero Core Dependencies – Built entirely on the Python standard library. Optional features may require external packages (see Installation).
---
## 🚀 Why Pico-IoC?
As Python systems evolve, wiring dependencies by hand becomes fragile and unmaintainable.
Pico-IoC eliminates that friction by letting you declare how components relate — not how they’re created.
| Feature | Manual Wiring | With Pico-IoC |
| :-------------- | :----------------------------- | :------------------------------ |
| Object creation | `svc = Service(Repo(Config()))` | `svc = container.get(Service)` |
| Replacing deps | Monkey-patch | `overrides={Repo: FakeRepo()}` |
| Coupling | Tight | Loose |
| Testing | Painful | Instant |
| Async support | Manual | Built-in (`aget`, `__ainit__`) |
---
## 🧩 Highlights (v2.2+)
- **Unified Configuration**: Use `@configured` to bind both flat (ENV-like) and tree (YAML/JSON) sources via the `configuration(...)` builder (ADR-0010).
- **Extensible Scanning**: Use `CustomScanner` to hook into the discovery phase and register functions or custom decorators (ADR-0011).
- **Async-aware AOP**: Method interceptors via `@intercepted_by`.
- **Scoped resolution**: singleton, prototype, request, session, transaction, and custom scopes.
- **Tree-based configuration**: Advanced mapping with reusable adapters (`Annotated[Union[...], Discriminator(...)]`).
- **Observable context**: Built-in stats, health checks (`@health`), observer hooks (`ContainerObserver`), and dependency graph export.
---
## 📦 Installation
```bash
pip install pico-ioc
```
Optional extras:
- YAML configuration support (requires PyYAML)
```bash
pip install pico-ioc[yaml]
```
- Dependency graph export as DOT/SVG (requires Graphviz)
```bash
pip install pico-ioc[graphviz]
```
-----
### ⚠️ Important Note
**Breaking Behavior in Scope Management (v2.1.3+):**
**Scope LRU Eviction has been removed** to guarantee data integrity.
* **Frameworks (pico-fastapi):** Handled automatically.
* **Manual usage:** You **must** explicitly call `container._caches.cleanup_scope("scope_name", scope_id)` when a context ends to prevent memory leaks.
-----
## ⚙️ Quick Example (Unified Configuration)
```python
import os
from dataclasses import dataclass
from pico_ioc import component, configured, configuration, init, EnvSource
# 1. Define configuration with @configured
@configured(prefix="APP_", mapping="auto") # Auto-detects flat mapping
@dataclass
class Config:
db_url: str = "sqlite:///demo.db"
# 2. Define components
@component
class Repo:
def __init__(self, cfg: Config): # Inject config
self.cfg = cfg
def fetch(self):
return f"fetching from {self.cfg.db_url}"
@component
class Service:
def __init__(self, repo: Repo): # Inject Repo
self.repo = repo
def run(self):
return self.repo.fetch()
# --- Example Setup ---
os.environ['APP_DB_URL'] = 'postgresql://user:pass@host/db'
# 3. Build configuration context
config_ctx = configuration(
EnvSource(prefix="") # Read APP_DB_URL from environment
)
# 4. Initialize container
container = init(modules=[__name__], config=config_ctx) # Pass context via 'config'
# 5. Get and use the service
svc = container.get(Service)
print(svc.run())
# --- Cleanup ---
del os.environ['APP_DB_URL']
```
Output:
```
fetching from postgresql://user:pass@host/db
```
-----
## 🧪 Testing with Overrides
```python
class FakeRepo:
def fetch(self): return "fake-data"
# Build configuration context (might be empty or specific for test)
test_config_ctx = configuration()
# Use overrides during init
container = init(
modules=[__name__],
config=test_config_ctx,
overrides={Repo: FakeRepo()} # Replace Repo with FakeRepo
)
svc = container.get(Service)
assert svc.run() == "fake-data"
```
-----
## 🧰 Profiles
Use profiles to enable/disable components or configuration branches conditionally.
```python
# Enable "test" profile when bootstrapping the container
container = init(
modules=[__name__],
profiles=["test"]
)
```
Profiles are typically referenced in decorators or configuration mappings to include/exclude components and bindings.
-----
## ⚡ Async Components
Pico-IoC supports async lifecycle and resolution.
```python
import asyncio
from pico_ioc import component, init
@component
class AsyncRepo:
async def __ainit__(self):
# e.g., open async connections
self.ready = True
async def fetch(self):
return "async-data"
async def main():
container = init(modules=[__name__])
repo = await container.aget(AsyncRepo) # Async resolution
print(await repo.fetch())
# Graceful async shutdown (calls @cleanup async methods)
await container.ashutdown()
asyncio.run(main())
```
- `__ainit__` runs after construction if defined.
- Use `container.aget(Type)` to resolve components that require async initialization.
- Use `await container.ashutdown()` to close resources cleanly.
-----
## 🩺 Lifecycle & AOP
```python
import time
from pico_ioc import component, init, intercepted_by, MethodInterceptor, MethodCtx
# Define an interceptor component
@component
class LogInterceptor(MethodInterceptor):
def invoke(self, ctx: MethodCtx, call_next):
print(f"→ calling {ctx.cls.__name__}.{ctx.name}")
start = time.perf_counter()
try:
res = call_next(ctx)
duration = (time.perf_counter() - start) * 1000
print(f"← {ctx.cls.__name__}.{ctx.name} done ({duration:.2f}ms)")
return res
except Exception as e:
duration = (time.perf_counter() - start) * 1000
print(f"← {ctx.cls.__name__}.{ctx.name} failed ({duration:.2f}ms): {e}")
raise
@component
class Demo:
@intercepted_by(LogInterceptor) # Apply the interceptor
def work(self):
print(" Working...")
time.sleep(0.01)
return "ok"
# Initialize container (must scan module containing interceptor too)
c = init(modules=[__name__])
result = c.get(Demo).work()
print(f"Result: {result}")
```
-----
## 👁️ Observability & Cleanup
- Export a dependency graph in DOT format:
```python
c = init(modules=[...])
c.export_graph("dependencies.dot") # Writes directly to file
```
- Health checks:
- Annotate health probes inside components with `@health` for container-level reporting.
- The container exposes health information that can be queried in observability tooling.
- Container cleanup:
- For sync apps: `container.shutdown()`
- For async apps: `await container.ashutdown()`
Use cleanup in application shutdown hooks to release resources deterministically.
-----
## 📖 Documentation
The full documentation is available within the `docs/` directory of the project repository. Start with `docs/README.md` for navigation.
- Getting Started: `docs/getting-started.md`
- User Guide: `docs/user-guide/README.md`
- Advanced Features: `docs/advanced-features/README.md`
- Observability: `docs/observability/README.md`
- Cookbook (Patterns): `docs/cookbook/README.md`
- Architecture: `docs/architecture/README.md`
- API Reference: `docs/api-reference/README.md`
- ADR Index: `docs/adr/README.md`
-----
## 🧩 Development
```bash
pip install tox
tox
```
-----
## 🧾 Changelog
See [CHANGELOG.md](./CHANGELOG.md) — Significant redesigns and features in v2.0+.
-----
## AI Coding Skills
Install [Claude Code](https://code.claude.com) or [OpenAI Codex](https://openai.com/index/introducing-codex/) skills for AI-assisted development with pico-ioc:
```bash
curl -sL https://raw.githubusercontent.com/dperezcabrera/pico-skills/main/install.sh | bash -s -- ioc
```
| Command | Description |
|---------|-------------|
| `/add-component` | Add components, factories, interceptors, event subscribers, settings |
| `/add-tests` | Generate tests for pico-framework components |
All skills: `curl -sL https://raw.githubusercontent.com/dperezcabrera/pico-skills/main/install.sh | bash`
See [pico-skills](https://github.com/dperezcabrera/pico-skills) for details.
-----
## 📜 License
MIT — [LICENSE](./LICENSE)
| text/markdown | null | David Perez Cabrera <dperezcabrera@gmail.com> | null | null | MIT License
Copyright (c) 2025 David Pérez Cabrera
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
| python, ioc, dependency-injection, di-container, inversion-of-control, ioc-container, zero-dependency, minimalistic, async, asyncio, modular, pluggable, ioc-framework, ioc-containers, inversion-of-control-container | [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Framework :: AsyncIO",
"Typing :: Typed",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent"
] | [] | null | null | >=3.11 | [] | [] | [] | [
"PyYAML; extra == \"yaml\"",
"graphviz; extra == \"graphviz\""
] | [] | [] | [] | [
"Homepage, https://github.com/dperezcabrera/pico-ioc",
"Documentation, https://dperezcabrera.github.io/pico-ioc/",
"Repository, https://github.com/dperezcabrera/pico-ioc",
"Changelog, https://github.com/dperezcabrera/pico-ioc/blob/main/CHANGELOG.md",
"Issue Tracker, https://github.com/dperezcabrera/pico-ioc/issues"
] | twine/6.1.0 CPython/3.13.7 | 2026-02-20T19:11:44.994389 | pico_ioc-2.2.4.tar.gz | 284,385 | 8c/3f/d4a5106940989e467d83b6efe0d98a1cff77954c1d256eda91dd0303fcdb/pico_ioc-2.2.4.tar.gz | source | sdist | null | false | 6ccc6c753c81aabb7f73f7b59b0e280e | 38efaf0e9c696cf8f8abafce639a929dfa86eee683ee1a8caaf4616eda68e86f | 8c3fd4a5106940989e467d83b6efe0d98a1cff77954c1d256eda91dd0303fcdb | null | [
"LICENSE"
] | 576 |
2.4 | async-lru | 2.2.0 | Simple LRU cache for asyncio | async-lru
=========
:info: Simple lru cache for asyncio
.. image:: https://github.com/aio-libs/async-lru/actions/workflows/ci-cd.yml/badge.svg?event=push
:target: https://github.com/aio-libs/async-lru/actions/workflows/ci-cd.yml?query=event:push
:alt: GitHub Actions CI/CD workflows status
.. image:: https://img.shields.io/pypi/v/async-lru.svg?logo=Python&logoColor=white
:target: https://pypi.org/project/async-lru
:alt: async-lru @ PyPI
.. image:: https://codecov.io/gh/aio-libs/async-lru/branch/master/graph/badge.svg
:target: https://codecov.io/gh/aio-libs/async-lru
.. image:: https://img.shields.io/matrix/aio-libs:matrix.org?label=Discuss%20on%20Matrix%20at%20%23aio-libs%3Amatrix.org&logo=matrix&server_fqdn=matrix.org&style=flat
:target: https://matrix.to/#/%23aio-libs:matrix.org
:alt: Matrix Room — #aio-libs:matrix.org
.. image:: https://img.shields.io/matrix/aio-libs-space:matrix.org?label=Discuss%20on%20Matrix%20at%20%23aio-libs-space%3Amatrix.org&logo=matrix&server_fqdn=matrix.org&style=flat
:target: https://matrix.to/#/%23aio-libs-space:matrix.org
:alt: Matrix Space — #aio-libs-space:matrix.org
Installation
------------
.. code-block:: shell
pip install async-lru
Usage
-----
This package is a port of Python's built-in `functools.lru_cache <https://docs.python.org/3/library/functools.html#functools.lru_cache>`_ function for `asyncio <https://docs.python.org/3/library/asyncio.html>`_. To better handle async behaviour, it also ensures multiple concurrent calls will only result in 1 call to the wrapped function, with all ``await``\s receiving the result of that call when it completes.
.. code-block:: python
import asyncio
import aiohttp
from async_lru import alru_cache
@alru_cache(maxsize=32)
async def get_pep(num):
resource = 'http://www.python.org/dev/peps/pep-%04d/' % num
async with aiohttp.ClientSession() as session:
try:
async with session.get(resource) as s:
return await s.read()
except aiohttp.ClientError:
return 'Not Found'
async def main():
for n in 8, 290, 308, 320, 8, 218, 320, 279, 289, 320, 9991:
pep = await get_pep(n)
print(n, len(pep))
print(get_pep.cache_info())
# CacheInfo(hits=3, misses=8, maxsize=32, currsize=8)
# closing is optional, but highly recommended
await get_pep.cache_close()
asyncio.run(main())
TTL (time-to-live in seconds, expiration on timeout) is supported by accepting `ttl` configuration
parameter (off by default):
.. code-block:: python
@alru_cache(ttl=5)
async def func(arg):
return arg * 2
To prevent thundering herd issues when many cache entries expire simultaneously,
you can add ``jitter`` to randomize the TTL for each entry:
.. code-block:: python
@alru_cache(ttl=3600, jitter=1800)
async def func(arg):
return arg * 2
With ``ttl=3600, jitter=1800``, each cache entry will have a random TTL
between 3600 and 5400 seconds, spreading out invalidations over time.
The library supports explicit invalidation for specific function call by
`cache_invalidate()`:
.. code-block:: python
@alru_cache(ttl=5)
async def func(arg1, arg2):
return arg1 + arg2
func.cache_invalidate(1, arg2=2)
The method returns `True` if corresponding arguments set was cached already, `False`
otherwise.
Limitations
-----------
**Event Loop Affinity**: ``alru_cache`` enforces that a cache instance is used with only
one event loop. If you attempt to use a cached function from a different event loop than
where it was first called, a ``RuntimeError`` will be raised:
.. code-block:: text
RuntimeError: alru_cache is not safe to use across event loops: this cache
instance was first used with a different event loop.
Use separate cache instances per event loop.
For typical asyncio applications using a single event loop, this is automatic and requires
no configuration. If your application uses multiple event loops, create separate cache
instances per loop:
.. code-block:: python
import threading
_local = threading.local()
def get_cached_fetcher():
if not hasattr(_local, 'fetcher'):
@alru_cache(maxsize=100)
async def fetch_data(key):
...
_local.fetcher = fetch_data
return _local.fetcher
You can also reuse the logic of an already decorated function in a new loop by accessing ``__wrapped__``:
.. code-block:: python
@alru_cache(maxsize=32)
async def my_task(x):
...
# In Loop 1:
# my_task() uses the default global cache instance
# In Loop 2 (or a new thread):
# Create a fresh cache instance for the same logic
cached_task_loop2 = alru_cache(maxsize=32)(my_task.__wrapped__)
await cached_task_loop2(x)
Benchmarks
----------
async-lru uses `CodSpeed <https://codspeed.io/>`_ for performance regression testing.
To run the benchmarks locally:
.. code-block:: shell
pip install -r requirements-dev.txt
pytest --codspeed benchmark.py
The benchmark suite covers both bounded (with maxsize) and unbounded (no maxsize) cache configurations. Scenarios include:
- Cache hit
- Cache miss
- Cache fill/eviction (cycling through more keys than maxsize)
- Cache clear
- TTL expiry
- Cache invalidation
- Cache info retrieval
- Concurrent cache hits
- Baseline (uncached async function)
On CI, benchmarks are run automatically via GitHub Actions on Python 3.13, and results are uploaded to CodSpeed (if a `CODSPEED_TOKEN` is configured). You can view performance history and detect regressions on the CodSpeed dashboard.
Thanks
------
The library was donated by `Ocean S.A. <https://ocean.io/>`_
Thanks to the company for contribution.
| text/x-rst | null | null | aiohttp team <team@aiohttp.org> | team@aiohttp.org | MIT License | asyncio, lru, lru_cache | [
"License :: OSI Approved :: MIT License",
"Intended Audience :: Developers",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Development Status :: 5 - Production/Stable",
"Framework :: AsyncIO"
] | [] | https://github.com/aio-libs/async-lru | null | >=3.10 | [] | [] | [] | [
"typing_extensions>=4.0.0; python_version < \"3.11\""
] | [] | [] | [] | [
"Chat: Matrix, https://matrix.to/#/#aio-libs:matrix.org",
"Chat: Matrix Space, https://matrix.to/#/#aio-libs-space:matrix.org",
"CI: GitHub Actions, https://github.com/aio-libs/async-lru/actions",
"GitHub: repo, https://github.com/aio-libs/async-lru"
] | twine/6.1.0 CPython/3.13.7 | 2026-02-20T19:11:43.848137 | async_lru-2.2.0.tar.gz | 14,654 | 05/8a/ca724066c32a53fa75f59e0f21aa822fdaa8a0dffa112d223634e3caabf9/async_lru-2.2.0.tar.gz | source | sdist | null | false | 588dd2fcc8ca6a808a8ecbfca4f92ca1 | 80abae2a237dbc6c60861d621619af39f0d920aea306de34cb992c879e01370c | 058aca724066c32a53fa75f59e0f21aa822fdaa8a0dffa112d223634e3caabf9 | null | [
"LICENSE"
] | 686,957 |
2.4 | mdsh5 | 0.1.4 | A higher level python package that uses mdsthin to read MDSPlus data and store it in hdf5 formate for easy caching, viewing, distribution, and analysis. | # mdsh5
[](https://github.com/anchal-physics/mdsh5/actions/workflows/test.yml)

A higher level python package that uses [`mdsthin`](https://github.com/MDSplus/mdsthin) to read MDSPlus data and store it in hdf5 formate for easy caching, viewing, distribution, and analysis.
## Usage:
### Installation (Recommended)
If you plan to use this package often, you can install it locally using PyPi.
```
pip install mdsh5
```
This will also install a script `read_mds` in your `bin` that you can call as:
```
read_mds
```
No need to even write python and you can call this script from anywhere in your computer. Note that if you installed this package in a conda environment, the script would go to conda environment's bin directory which is typically present in `$HOME/anaconda3/envs/<env_name>/bin` and this might not be in your path by default.
### Don't want to install
You can download the [read_mds.py](https://github.com/anchal-physics/mdsh5/blob/main/mdsh5/read_mds.py) file from mdsh5 directory and use it directly or import it in your python code as per your need. You'll need to install `h5py`, `PyYaml`, `tqdm`, and [`mdsthin`](https://github.com/MDSplus/mdsthin). For your convinience, a conda environment is provided in this repository to install the required packages in a separate environment. To use:
```
conda env create -f conda_env.yml
conda activate mdsh5
```
## Purpose
If you want to run custom analysis on your shot data from the device, it can become tedious to download data using existing tools. To this end, [`mdsthin`](https://github.com/MDSplus/mdsthin) now provides an excellent pythonic solution to download MDSPlus data
from remote servers.
This package is one level higher data management tool. It uses [`mdsthin`](https://github.com/MDSplus/mdsthin) to download data but provides a functionality to provide required shot numbers, tree names, and point names in an organized yaml format and creates a fast transversible data dictionary in HDF5 format. HDF5 is simple self-describing fiole format which is supported on multiple platforms and has well developed libraries for reading and writing in almost all programming languages. The msot important aspect is that when python opens an HDF5 file, it can navigate through the data dictionary and read only the required portion of the data file. Thus it requires much less RAM and even if the accumulated data is in GigaBytes, you can read small particular portions of it very fast.
Additionally, if you use VSCode, I highly recomment installing the [H5Web extension](https://marketplace.visualstudio.com/items?itemName=h5web.vscode-h5web) which let's you quickly visualize the data stored in the HDF5 files created by this package.

## Documentation
**NOTE:** All tree and pointnames will be converted to upper case regardless of how you enter them. This is a chosen convention to keep the cache consistent even if you change the case of a pointname.
Additional documentation would come soon. For now, please refer to the [config_examples](https://github.com/anchal-physics/mdsh5/tree/main/mdsh5/config_examples) to get started on how to provide the input configuration.
Additionally, use the help flag to print out the help message from `read_mds`:
```
% read_mds -h
usage: read_mds [-h] [-n SHOT_NUMBERS [SHOT_NUMBERS ...]] [-t TREES [TREES ...]] [-p POINT_NAMES [POINT_NAMES ...]] [-s SERVER] [-x PROXY_SERVER]
[-r RESAMPLE [RESAMPLE ...]] [--rescale RESCALE [RESCALE ...]] [-o OUT_FILENAME] [--reread_data] [-f] [-c CONFIG] [--configTemplate]
Read data from MDSPlus server for provided shot numbers, trees, and pointnames.
options:
-h, --help show this help message and exit
-n, --shot_numbers SHOT_NUMBERS [SHOT_NUMBERS ...]
Shot number(s). You can provide a range using double quotes to pass a string.eg. -n "12345 to 12354"
-t, --trees TREES [TREES ...]
Tree name(s)
-p, --point_names POINT_NAMES [POINT_NAMES ...]
Point name(s). Must match number of trees provided unless a single tree is given.
-s, --server SERVER MDSPlus server in the format of username@ip_address:port Default is None
-x, --proxy_server PROXY_SERVER
Proxy server to use to tunnel through to the server. If provided, the username part from server definition will be used to ssh into the proxy
server from where it assumed that you have access to the MDSplus server. If the username for proxy-server is different, add it as a prefix here
with @. Default is None
-r, --resample RESAMPLE [RESAMPLE ...]
Resample signal(s) by providing a list of start, stop, and increment values. For negative value, enclose them withing double quotes and add a space
at the beginning.Example: --resample " -0.1" 10.0 0.1
--rescale RESCALE [RESCALE ...]
Rescale time dimension of trees to ensure that all of are in same units. Especially important if resample is used. Provide a rescaling factor to be
multiplied by time axis for each tree provides in trees option.Example: --resample " -0.1" 10.0 0.1
-o, --out_filename OUT_FILENAME
Output filename for saving data in file. Default is None. in which case it does not save files.
--reread_data Will overwrite on existing data for corresponding data entries in out_file. Default behavior is to skip readingpointnames whose data is present.
-f, --force_full_data_read
If resample fails, full data read will be attempted without resampling. This is useful in cases where the time axis is stored in other than dim0
data field.
-c, --config CONFIG Configuration file containing shot_numbers, trees, point_names, server, and other settings. If provided, corresponding command line arguments are
take precedence over arguments provided in configuration file.
--configTemplate If provided, configuration templates will be copied to current directory. All other arguments will be ignored.
```
You can also search shots using `search_shots`:
```
% search_shots -h
usage: search_shots [-h] [-c SEARCH_CONFIG] [-s SERVER] [-o OUT_FILENAME] [-x PROXY_SERVER] [--configTemplate]
Search MDSPlus server for provided search criteria and return a list of shots
options:
-h, --help show this help message and exit
-c, --search_config SEARCH_CONFIG
Configuration file containing search criteria.
-s, --server SERVER Server address. Default is None (read from search_config).
-o, --out_filename OUT_FILENAME
Output filename for saving selected shot numbers. Default is None in which case it looks for the value in search_config otherwise the selected
shots are simply printed out.
-x, --proxy_server PROXY_SERVER
Proxy server to use to tunnel through to the server. If provided, the username part from server definition will be used to ssh into the proxy
server from where it assumed that you have access to the MDSplus server. If the username for proxy-server is different, add it as a prefix here
with @. Default is None
--configTemplate If provided, configuration templates will be copied to current directory. All other arguments will be ignored.
```
Again, using `--configTemplate` option would locally copy D3D and KSTAR config files for you and from there it is self-explaintory on how to use them.
Note, that if you are outside the network from where MDSplus server can be queries, you can provide ssh details of a proxy server or the gateway node from where you can access the MDSplus serve. See the template files for examples.
For queries, contanct Anchal Gupta (guptaa@fusion.gat.com). If you face any issues or have feature requests, please submit them at the [issue tracker](https://github.com/anchal-physics/mdsh5/issues).
## Recommended ssh key configurations
It would be very useful if you can access the proxy server (or gateway node) without password. For setting that up, do:
### Create ssh key pair if you donot have it already
```
ssh-keygen -t rsa -b 4096 -C "your_email@domain.com"
```
### Copy the public key to Gateway node
```
ssh-copy-id remote_username@GatewayNodeAddress -i path_to_creates_ssh_id_file
```
This step will prompt you for password of the Gateway node. Once this step is completed,
you should be able to ssh into the gateway node without need of password using:
```
ssh remote_username@GatewayNodeAddress -p port_number
```
### Add gateway to ssh config for ease (Optional)
```
Host <GatewayShortName> <GatewayNodeAddress>
Hostname <GatewayNodeAddress>
IdentityFile <path_to_creates_ssh_id_file>
User <your_username>
Port <required_port_if_different_from_22>
```
| text/markdown | null | Anchal Gupta <anchal.physics@gmail.com> | null | null | Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. | HDF5, MDSPLus | [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Topic :: Software Development :: Build Tools"
] | [] | null | null | >=3.7 | [] | [] | [] | [
"h5py>=3",
"mdsthin",
"pyyaml",
"tqdm"
] | [] | [] | [] | [
"Homepage, https://github.com/anchal-physics/mdsh5",
"Bug Reports, https://github.com/anchal-physics/mdsh5/issues",
"Source, https://github.com/anchal-physics/mdsh5"
] | twine/6.2.0 CPython/3.13.5 | 2026-02-20T19:11:33.893555 | mdsh5-0.1.4.tar.gz | 17,166 | 39/2c/c754d4f8110a816603ba8de68ac4137aa8002edfb36b8a8bbfa55a05fd0d/mdsh5-0.1.4.tar.gz | source | sdist | null | false | 9d4abfa1c6fe5fad4a83f2bf0258e47c | 04beebbe311927b19a3d81af562a2257605e47c8f8d885b3b2ffc604806e7471 | 392cc754d4f8110a816603ba8de68ac4137aa8002edfb36b8a8bbfa55a05fd0d | null | [
"LICENSE"
] | 204 |
2.4 | thelab-instrumentation | 0.5.0b0 | Shared instrumentation and monitoring code for Django projects | # thelab-instrumentation
[](https://gitlab.com/thelabnyc/thelab-instrumentation/-/releases)
[](https://gitlab.com/thelabnyc/thelab-instrumentation/-/commits/master)
[](https://gitlab.com/thelabnyc/thelab-instrumentation/-/commits/master)
A fully type-safe instrumentation and monitoring library for Django projects. This package provides:
- Metrics collection and reporting to various backends (CloudWatch, Logging)
- RQ queue monitoring
- Structured logging helpers for [django-structlog](https://django-structlog.readthedocs.io/)
- Task lifecycle logging for [django-tasks](https://github.com/RealOrangeOne/django-tasks) and Django 6 native tasks
- Clean, type-safe API with comprehensive mypy typing
## Installation
Install the package using your package manager of choice:
```sh
# Using uv (recommended)
uv pip install thelab-instrumentation
# Using pip
pip install thelab-instrumentation
```
Add the package to your Django `INSTALLED_APPS`:
```py
INSTALLED_APPS = [
# ...
'thelabinstrumentation',
'thelabinstrumentation.rq', # Include if using RQ monitoring
'thelabinstrumentation.structlog', # Include if using django-structlog
# ...
]
```
### Optional Dependencies
Install extras for the integrations you need:
```sh
# For RQ monitoring
uv pip install 'thelab-instrumentation[rq]'
# For structured logging
uv pip install 'thelab-instrumentation[structlog]'
# For django-tasks lifecycle logging
uv pip install 'thelab-instrumentation[tasks]'
```
## Configuration
Configure the library in your Django settings:
```py
THELAB_INSTRUMENTATION = {
# Metrics backend (default: logging backend)
'BACKEND': 'thelabinstrumentation.backends.cloudwatch.CloudWatchBackend',
# Backend-specific options
'OPTIONS': {
# Cloudwatch Backend
"namespace": 'MyApplication',
},
# Update interval in seconds (default: 60)
'UPDATE_INTERVAL': 60,
# Global dimensions added to all metrics
'DIMENSIONS': {
'Environment': 'production',
'Application': 'my-app',
},
# Request headers to bind to structlog context (header name -> context var name)
'STRUCTLOG_REQUEST_HEADERS': {
'x-amz-cf-id': 'cf_id',
'x-amzn-trace-id': 'x_amzn_trace_id',
},
}
```
### Structlog Integration
The `thelabinstrumentation.structlog` app provides:
**HeaderBindingMiddleware** — Reads configured request headers and binds them to structlog contextvars. Must be placed **before** `django_structlog.middlewares.RequestMiddleware` so that bound headers are included in the `request_started` log event.
**QueryStatsMiddleware** — Tracks per-request database query count and total query duration, binding them as `db_query_count` and `db_query_duration_ms` to structlog contextvars. Must be placed **after** `django_structlog.middlewares.RequestMiddleware` so that the stats are bound before `request_finished` is logged. Uses Django's `connection.execute_wrapper()` API internally, so it works with any database backend without configuration changes.
```py
MIDDLEWARE = [
# ...
'thelabinstrumentation.structlog.middleware.HeaderBindingMiddleware',
'django_structlog.middlewares.RequestMiddleware',
'thelabinstrumentation.structlog.db.QueryStatsMiddleware',
# ...
]
```
The headers to bind are configured via `STRUCTLOG_REQUEST_HEADERS` in `THELAB_INSTRUMENTATION` (see above). Each key is an HTTP header name and each value is the structlog context variable name it maps to.
**bind_username** — A signal receiver that automatically binds the authenticated user's username to structlog context. It connects to `django_structlog.signals.bind_extra_request_metadata` when the app is loaded — no manual wiring needed.
**Task lifecycle logging** — Signal receivers for `task_enqueued`, `task_started`, and `task_finished` that log task metadata to structlog context. Compatible with both [django-tasks](https://github.com/RealOrangeOne/django-tasks) (backport for Django 5.x) and Django 6's native `django.tasks`. Connected automatically when the app is loaded and a tasks package is available.
## Development
### Setup Development Environment
```sh
# Clone the repository
git clone https://gitlab.com/thelabnyc/thelab-instrumentation.git
cd thelab-instrumentation
# Install dependencies
uv sync
# Install prek hooks
prek install
```
### Run Tests
```sh
# Run all tests
uv run tox
# Run mypy type checking
uv run mypy thelabinstrumentation/
# Run linting
uv run ruff check
```
| text/markdown | null | thelab <thelabdev@thelab.co> | null | null | ISC | null | [] | [] | null | null | >=3.13 | [] | [] | [] | [
"django-stubs-ext>=5.2.9",
"django<7.0,>=5.2",
"sentry-sdk>=2.53.0",
"typing-extensions>=4.15.0",
"boto3>=1.42.43; extra == \"cloudwatch\"",
"django-rq>=3.2.2; extra == \"rq\"",
"rq>=2.6.1; extra == \"rq\"",
"django-structlog>=8.0; extra == \"structlog\"",
"django-tasks>=0.7; extra == \"tasks\""
] | [] | [] | [] | [
"Homepage, https://gitlab.com/thelabnyc/thelab-instrumentation",
"Documentation, https://gitlab.com/thelabnyc/thelab-instrumentation",
"Repository, https://gitlab.com/thelabnyc/thelab-instrumentation"
] | twine/6.2.0 CPython/3.14.3 | 2026-02-20T19:10:39.851004 | thelab_instrumentation-0.5.0b0.tar.gz | 71,331 | 56/2e/d97beb360902120ec8b2abdc812c3d423e3e0a576a4ae9efbb5eaf408f43/thelab_instrumentation-0.5.0b0.tar.gz | source | sdist | null | false | 714c74324888469f74d5cde319396cd9 | 3f2e179c20d05efb7dcf09b4ba94af0ae88adb0792c40e86832f8cf766a7b4d2 | 562ed97beb360902120ec8b2abdc812c3d423e3e0a576a4ae9efbb5eaf408f43 | null | [
"LICENSE"
] | 263 |
2.4 | oxbitnet | 0.3.1 | Run BitNet b1.58 ternary LLMs with wgpu | # oxbitnet
Run [BitNet b1.58](https://github.com/microsoft/BitNet) ternary LLMs with GPU acceleration (wgpu).
Python bindings for [0xBitNet](https://github.com/m96-chan/0xBitNet) — also available as [`0xbitnet`](https://www.npmjs.com/package/0xbitnet) (npm) and [`oxbitnet`](https://crates.io/crates/oxbitnet) (Rust).
## Install
```bash
pip install oxbitnet
```
## Quick Start
```python
from oxbitnet import BitNet
model = BitNet.load_sync("model.gguf")
# Chat with streaming output
model.chat(
[("system", "You are a helpful assistant."), ("user", "Hello!")],
on_token=lambda t: print(t, end="", flush=True),
temperature=0.7,
top_k=40,
)
model.dispose()
```
## API
| Method | Description |
|--------|-------------|
| `BitNet.load_sync(source)` | Load a GGUF model from URL or path |
| `model.chat(messages, on_token, ...)` | Chat with template + streaming callback |
| `model.generate(prompt, on_token, ...)` | Generate with streaming callback |
| `model.generate_sync(prompt, ...)` | Generate, return full string |
| `model.generate_tokens_sync(prompt, ...)` | Generate, return list of token strings |
| `model.dispose()` | Release GPU resources |
### Parameters
All generate methods accept:
- `max_tokens` (default: 256)
- `temperature` (default: 1.0)
- `top_k` (default: 50)
- `repeat_penalty` (default: 1.1)
## License
MIT
| text/markdown; charset=UTF-8; variant=GFM | null | null | null | null | MIT | null | [
"Programming Language :: Rust",
"Programming Language :: Python :: Implementation :: CPython"
] | [] | null | null | >=3.9 | [] | [] | [] | [] | [] | [] | [] | [] | twine/6.1.0 CPython/3.13.7 | 2026-02-20T19:09:54.077743 | oxbitnet-0.3.1-cp312-cp312-win_amd64.whl | 4,605,891 | 1c/5c/89d94355104effc5f5d6d9980caaa9db50118abb72f87af8f69ce119bad8/oxbitnet-0.3.1-cp312-cp312-win_amd64.whl | cp312 | bdist_wheel | null | false | d6705eb1dd774675bb7c121f3695987b | baff2216e4d228d8a4e8c1e3c36405b1545437dd82f30ee7bb13cfc7700ed7b3 | 1c5c89d94355104effc5f5d6d9980caaa9db50118abb72f87af8f69ce119bad8 | null | [] | 237 |
2.4 | msmcp-template | 0.0.12a5905147 | Template MCP Server - Basic Model Context Protocol implementation |
# Microsoft Template MCP Server
| text/markdown | null | Microsoft <azuremcp@microsoft.com> License-Expression: MIT | null | null | null | ai, llm, mcp, model-context-protocol, template | [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Libraries :: Python Modules"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/Microsoft/mcp/blob/main/servers/Template.Mcp.Server#readme",
"Documentation, https://github.com/Microsoft/mcp/blob/main/servers/Template.Mcp.Server#readme",
"Repository, https://github.com/microsoft/mcp",
"Issues, https://github.com/microsoft/mcp/issues"
] | RestSharp/106.13.0.0 | 2026-02-20T19:09:00.160127 | msmcp_template-0.0.12a5905147-py3-none-win_arm64.whl | 13,142,290 | d0/84/26a2b676c0ff06014aff143245d2850f5af687654a5a058157f7050f8c5d/msmcp_template-0.0.12a5905147-py3-none-win_arm64.whl | py3 | bdist_wheel | null | false | 0644f851464d56ac6124d5096691b48e | f7b3f6d89b9363f1431a0e99abb241081ea37a33fbc85b67d55e9181fd97072b | d08426a2b676c0ff06014aff143245d2850f5af687654a5a058157f7050f8c5d | null | [] | 341 |
2.4 | ppapp | 1.2.1 | Piecewise polynomial approximation: code generator for Chebyshev approximation | # ppapp/R - piecewise polynomial approximation of real functions
Code generator for piecewise Chebyshev approximation of smooth real-valued functions.
## Overview
This package generates C source code containing polynomial coefficients that approximate
a given function f(x) over a specified domain. The approximation uses piecewise Chebyshev
polynomials with octave-based domain subdivision for optimal accuracy.
**Reference:** Joachim Wuttke and Alexander Kleinsorge,
"Algorithm 1XXX: Code generation for piecewise Chebyshev approximation"
**Documentation:** [userManual.pdf](https://jugit.fz-juelich.de/mlz/ppapp/-/blob/main/R/userManual/userManual.pdf)
| text/markdown | null | Joachim Wuttke <j.wuttke@fz-juelich.de>, Alexander Kleinsorge <alkl9873@th-wildau.de> | null | null | GPL-3.0-or-later | chebyshev, approximation, polynomial, code-generation, numerical | [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Scientific/Engineering :: Mathematics"
] | [] | null | null | >=3.9 | [] | [] | [] | [
"python-flint>=0.4.0",
"pytest>=7.0; extra == \"dev\"",
"ruff>=0.1.0; extra == \"dev\"",
"mypy>=1.0; extra == \"dev\""
] | [] | [] | [] | [
"Repository, https://jugit.fz-juelich.de/mlz/ppapp",
"Documentation, https://jugit.fz-juelich.de/mlz/ppapp/-/blob/main/R/userManual/userManual.pdf"
] | twine/6.2.0 CPython/3.12.4 | 2026-02-20T19:08:51.884044 | ppapp-1.2.1.tar.gz | 197,898 | 8b/d2/35adc2fdebf7489339630877047b50c49c49361407ec88f08219ca2ff5ea/ppapp-1.2.1.tar.gz | source | sdist | null | false | bc2da8cffd2dcacb3e18748f4398a5d5 | 57b14da979d83668c25b4cb3bc16d50a4cfd7c1deb6261ba268e6aa8270ef679 | 8bd235adc2fdebf7489339630877047b50c49c49361407ec88f08219ca2ff5ea | null | [
"LICENSE"
] | 213 |
2.4 | empirica-mcp | 1.5.4 | MCP server for Empirica epistemic framework | # Empirica MCP Server
**MCP (Model Context Protocol) server for Empirica epistemic framework**
[](https://pypi.org/project/empirica-mcp/)
[]()
[](../LICENSE)
---
## Installation
```bash
pip install empirica-mcp
```
**Note:** The MCP server requires the full Empirica package for stateful operations:
```bash
pip install empirica # Recommended - includes empirica-mcp
```
### Verify Installation
```bash
empirica --version # CLI
empirica-mcp --help # MCP server
```
---
## Quick Start
### 1. Standard Mode
```bash
empirica-mcp
```
Works as a standard MCP tool provider. No epistemic layer.
### 2. Epistemic Mode
```bash
export EMPIRICA_EPISTEMIC_MODE=true
empirica-mcp
```
Every tool call now includes epistemic self-awareness - the server maintains vector state and routes behavior based on confidence/uncertainty.
### 3. Personality Profiles
```bash
# Cautious (investigates early)
export EMPIRICA_PERSONALITY=cautious_researcher
# Pragmatic (action-oriented)
export EMPIRICA_PERSONALITY=pragmatic_implementer
# Balanced (default)
export EMPIRICA_PERSONALITY=balanced_architect
# Adaptive (learns over time)
export EMPIRICA_PERSONALITY=adaptive_learner
```
---
## Claude Desktop Configuration
### Standard Mode
```json
{
"mcpServers": {
"empirica": {
"command": "empirica-mcp"
}
}
}
```
### Epistemic Mode
```json
{
"mcpServers": {
"empirica-epistemic": {
"command": "bash",
"args": [
"-c",
"EMPIRICA_EPISTEMIC_MODE=true EMPIRICA_PERSONALITY=balanced_architect empirica-mcp"
]
}
}
}
```
After editing config, restart Claude Desktop completely.
---
## Available Tools
The MCP server exposes 60+ Empirica CLI commands as MCP tools:
**Session Management:**
- `session_create` - Create new session
- `session_list` - List sessions
- `session_show` - Show session details
**CASCADE Workflow:**
- `preflight_submit` - Submit PREFLIGHT assessment
- `check_submit` - Execute CHECK gate
- `postflight_submit` - Submit POSTFLIGHT assessment
**Goals & Findings:**
- `goals_create` - Create goals
- `goals_list` - List goals
- `finding_log` - Log findings
- `unknown_log` - Log unknowns
**And many more...**
---
## Epistemic Responses
### Standard Response
```json
{
"ok": true,
"session_id": "abc123",
"message": "Session created"
}
```
### Epistemic Response
```json
{
"ok": true,
"session_id": "abc123",
"message": "Session created",
"epistemic_state": {
"vectors": {
"know": 0.60,
"uncertainty": 0.40,
"context": 0.70,
"clarity": 0.85
},
"routing": {
"mode": "confident_implementation",
"confidence": 0.85,
"reasoning": "Know=0.60 >= 0.6, Uncertainty=0.40 < 0.5"
}
}
}
```
---
## Behavioral Modes
| Mode | Trigger | Behavior |
|------|---------|----------|
| **clarify** | clarity < 0.6 | Ask questions before proceeding |
| **load_context** | context < 0.5 | Load project data first |
| **investigate** | uncertainty > 0.6 | Systematic research |
| **confident_implementation** | know >= 0.7, uncertainty < 0.4 | Direct action |
| **cautious_implementation** | Moderate vectors | Careful, incremental steps |
---
## Troubleshooting
### "empirica CLI not found"
```bash
# Check if empirica is in PATH
which empirica
# If not, install full package
pip install empirica
```
### "Module not found: empirica"
```bash
# Install full package (not just MCP server)
pip install empirica
```
### Claude Desktop not connecting
1. Verify JSON syntax (no trailing commas)
2. Quit Claude Desktop completely
3. Restart Claude Desktop
4. Check logs for errors
---
## Docker
```bash
docker pull nubaeon/empirica:1.5.4
docker run -p 3000:3000 nubaeon/empirica:1.5.4 empirica-mcp
```
---
## Requirements
- Python 3.11+
- empirica >= 1.4.0
- mcp >= 1.0.0
---
## Documentation
- [Empirica Documentation](https://github.com/Nubaeon/empirica/tree/main/docs)
- [MCP Protocol](https://modelcontextprotocol.io)
## License
MIT License - See [Empirica repository](https://github.com/Nubaeon/empirica) for details.
| text/markdown | David S. L. Van Assche | null | null | null | null | mcp, empirica, epistemic, ai, metacognition | [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries :: Python Modules"
] | [] | null | null | >=3.11 | [] | [] | [] | [
"empirica>=1.5.0",
"mcp>=1.0.0"
] | [] | [] | [] | [
"Homepage, https://github.com/Nubaeon/empirica",
"Documentation, https://github.com/Nubaeon/empirica/tree/main/docs",
"Repository, https://github.com/Nubaeon/empirica",
"Issues, https://github.com/Nubaeon/empirica/issues"
] | twine/6.2.0 CPython/3.13.7 | 2026-02-20T19:08:21.094563 | empirica_mcp-1.5.4.tar.gz | 46,628 | 77/9d/33e58656957507c7bf48db14b811cb780594a69ef0be323ee2127b25bda2/empirica_mcp-1.5.4.tar.gz | source | sdist | null | false | 8506c00dcbfbde7615811675fa7c1289 | 8cafd57cd0b0c740da91fe4aa942770cca3907e5d89cfbea4b3d064f77c665e7 | 779d33e58656957507c7bf48db14b811cb780594a69ef0be323ee2127b25bda2 | MIT | [] | 213 |
2.4 | empirica | 1.5.4 | Genuine AI epistemic self-assessment framework - Universal interface for single AI tracking | # Empirica
> **Teaching AI to know what it knows—and what it doesn't**
[](https://github.com/Nubaeon/empirica/releases/tag/v1.5.4)
[](https://pypi.org/project/empirica/)
[]()
[](LICENSE)
---
## What is Empirica?
Empirica is an **epistemic self-awareness framework** that enables AI agents to genuinely understand the boundaries of their own knowledge. Instead of producing confident-sounding responses regardless of actual understanding, AI agents using Empirica can accurately assess what they know, identify gaps, and communicate uncertainty honestly.
**The core insight:** AI systems today lack functional self-awareness. They can't reliably distinguish between "I know this well" and "I'm guessing." Empirica provides the cognitive infrastructure to make this distinction measurable and actionable.
---
## Why This Matters
**The Problem:** AI agents exhibit "confident ignorance"—they generate plausible-sounding responses about topics they don't actually understand. This leads to:
- Hallucinated facts presented as truth
- Wasted time investigating already-explored dead ends
- Knowledge lost between sessions
- No way to tell when an AI is genuinely confident vs. bluffing
**The Solution:** Empirica introduces **epistemic vectors**—quantified measures of knowledge state that AI agents track in real-time. These vectors emerged from observing what information actually matters when assessing cognitive readiness.
---
## The 13 Foundational Vectors
These vectors weren't designed in a vacuum. They **emerged from 600+ real working sessions** across multiple AI systems (Claude, GPT-4, Gemini, Qwen, and others), with Claude serving as the primary development partner due to its reasoning capabilities.
The pattern proved universal: regardless of which AI system we tested, these same dimensions consistently predicted success or failure in complex tasks.
### The Vector Space
| Tier | Vector | What It Measures |
|------|--------|------------------|
| **Gate** | `engagement` | Is the AI actively processing or disengaged? |
| **Foundation** | `know` | Domain knowledge depth (0.7+ = ready to act) |
| | `do` | Execution capability |
| | `context` | Access to relevant information |
| **Comprehension** | `clarity` | How clear is the understanding? |
| | `coherence` | Do the pieces fit together? |
| | `signal` | Signal-to-noise in available information |
| | `density` | Information richness |
| **Execution** | `state` | Current working state |
| | `change` | Rate of progress/change |
| | `completion` | Task completion level |
| | `impact` | Significance of the work |
| **Meta** | `uncertainty` | Explicit doubt tracking (0.35- = ready to act) |
### Why These Vectors?
**Readiness Gate:** Through empirical observation, we found that `know ≥ 0.70` AND `uncertainty ≤ 0.35` reliably predicts successful task execution. Below these thresholds, investigation is needed.
**The Key Insight:** The `uncertainty` vector is explicitly tracked because AI systems naturally underreport doubt. Making it a first-class metric forces honest assessment.
---
## Applications Across Industries
While the vectors emerged from software development work, they map to any domain requiring knowledge assessment:
| Industry | Primary Vectors | Use Case |
|----------|-----------------|----------|
| **Software Development** | know, context, uncertainty, completion | Code review, architecture decisions, debugging |
| **Research & Analysis** | know, clarity, coherence, signal | Literature review, hypothesis testing |
| **Healthcare** | know, uncertainty, impact | Diagnostic confidence, treatment recommendations |
| **Legal** | context, clarity, coherence | Case analysis, precedent research |
| **Education** | know, do, completion | Learning assessment, curriculum design |
| **Finance** | know, uncertainty, impact | Risk assessment, investment analysis |
### Why Software Development First?
Software engineering provides an ideal testbed because:
1. **Measurable outcomes** - Code either works or it doesn't
2. **Complex knowledge states** - Requires synthesizing documentation, code, tests, and context
3. **Session continuity** - Projects span days/weeks with context loss between sessions
4. **Multi-agent potential** - Team collaboration benefits from shared epistemic state
Empirica was battle-tested here before expanding to other domains.
---
## Quick Start
### For End Users
**Visit [getempirica.com](https://getempirica.com)** for the guided setup experience with tutorials and support.
### For Developers: One-Command Install
The installer sets up everything: Claude Code hooks, system prompts, environment configuration, and a demo project.
#### Linux / macOS
```bash
curl -fsSL https://raw.githubusercontent.com/Nubaeon/empirica/main/scripts/install.py | python3 -
```
Or download and run manually:
```bash
wget https://raw.githubusercontent.com/Nubaeon/empirica/main/scripts/install.py
python3 install.py
```
#### Windows (PowerShell)
```powershell
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/Nubaeon/empirica/main/scripts/install.py" -OutFile "install.py"
python install.py
```
#### What the Installer Does
1. **Installs Empirica** via pip
2. **Sets up Claude Code hooks** for automatic epistemic continuity
3. **Places CLAUDE.md** in the correct location (`~/.claude/CLAUDE.md`)
4. **Configures environment variables** for your shell
5. **Creates a demo project** so you can try it immediately
6. **Optionally sets up Qdrant** for semantic memory (local vector search)
### Manual Installation
If you prefer manual setup:
```bash
# Install from PyPI
pip install empirica
# Or with all features
pip install empirica[all]
# MCP Server (for Claude Desktop, Cursor, etc.)
pip install empirica-mcp
# Initialize in your project
cd your-project
empirica project-init
```
> **⚠️ Important: System Prompt Required**
>
> Empirica requires a system prompt to function correctly. The CLI tools work without it,
> but the full epistemic workflow (CASCADE phases, calibration, Sentinel gates) requires
> the AI to understand the framework.
>
> **For manual installations, copy the system prompt:**
> ```bash
> # Create Claude Code config directory
> mkdir -p ~/.claude
>
> # Copy the system prompt (choose your AI)
> curl -fsSL https://raw.githubusercontent.com/Nubaeon/empirica/main/docs/human/developers/system-prompts/CLAUDE.md \
> -o ~/.claude/CLAUDE.md
> ```
>
> The installer handles this automatically. See [System Prompts](docs/human/developers/system-prompts/)
> for prompts for other AI assistants (Copilot, etc.).
### Homebrew (macOS)
```bash
brew tap nubaeon/tap
brew install empirica
```
### Docker
```bash
# Standard image (Debian slim, ~414MB)
docker pull nubaeon/empirica:1.5.4
# Security-hardened Alpine image (~276MB, recommended)
docker pull nubaeon/empirica:1.5.4-alpine
# Run
docker run -it -v $(pwd)/.empirica:/data/.empirica nubaeon/empirica:1.5.4 /bin/bash
```
---
## After Installation: Getting Started
Once installed, let Empirica teach you how it works:
### Option 1: Interactive Onboarding (Recommended)
```bash
# Start the guided onboarding experience
empirica onboard
```
This walks you through creating your first session, understanding vectors, and logging your first finding.
### Option 2: Ask the AI to Explain
If you're using Claude Code or another AI with Empirica installed:
```
"Explain how Empirica works using docs-explain"
"What are epistemic vectors and how do I use them?"
"Help me set up Empirica for my project"
```
The AI can query Empirica's documentation semantically and explain concepts tailored to your context.
### Option 3: Explore Documentation
```bash
# Search documentation semantically
empirica docs-explain --topic "epistemic vectors"
empirica docs-explain --topic "CASCADE workflow"
empirica docs-explain --topic "session management"
# List all available topics
empirica docs-list
```
### Option 4: Try the Demo Project
The installer creates a demo project at `~/empirica-demo/`. Navigate there and follow the `WALKTHROUGH.md`:
```bash
cd ~/empirica-demo
cat WALKTHROUGH.md
```
### Expanding Your Own Projects
Once you understand the basics, add epistemic foundations to your existing projects:
```bash
cd your-existing-project
empirica project-init
# Create your first session
empirica session-create --ai-id claude-code --output json
# Start tracking what you know
empirica preflight-submit -
```
---
## Documentation
### For Humans
Start here based on your role:
| Role | Start With | Then Read |
|------|------------|-----------|
| **End User** | [Getting Started](docs/human/end-users/01_START_HERE.md) | [Empirica Explained Simply](docs/human/end-users/EMPIRICA_EXPLAINED_SIMPLE.md) |
| **Developer** | [Developer README](docs/human/developers/README.md) | [Claude Code Setup](docs/human/developers/CLAUDE_CODE_SETUP.md) |
**Documentation Structure:**
```
docs/
├── human/ # Human-readable documentation
│ ├── end-users/ # Installation, concepts, troubleshooting
│ └── developers/ # Integration, system prompts, API
│ └── system-prompts/ # AI system prompts (Claude, Copilot, etc.)
│
└── architecture/ # Technical architecture (for AI context loading)
```
### For AI Integration
If you're integrating Empirica into an AI system:
- **System Prompts:** [docs/human/developers/system-prompts/](docs/human/developers/system-prompts/)
- **MCP Server:** [empirica-mcp/](empirica-mcp/) (Model Context Protocol integration)
- **Architecture Docs:** [docs/architecture/](docs/architecture/) (AI-optimized technical reference)
### Key Guides
| Guide | Purpose |
|-------|---------|
| [CASCADE Workflow](docs/architecture/CASCADE_WORKFLOW.md) | The PREFLIGHT → CHECK → POSTFLIGHT loop |
| [Epistemic Vectors Explained](docs/human/end-users/05_EPISTEMIC_VECTORS_EXPLAINED.md) | Deep dive into all 13 vectors |
| [CLI Reference](docs/human/developers/CLI_COMMANDS_UNIFIED.md) | Complete command documentation |
| [Storage Architecture](docs/architecture/STORAGE_ARCHITECTURE_COMPLETE.md) | Four-layer data persistence |
---
## How It Works
### The CASCADE Workflow
Every significant task follows this loop:
```
PREFLIGHT ────────► CHECK ────────► POSTFLIGHT
│ │ │
│ │ │
Baseline Decision Learning
Assessment Gate Delta
│ │ │
"What do I "Am I ready "What did I
know now?" to act?" learn?"
```
**PREFLIGHT:** AI assesses its knowledge state before starting work.
**CHECK:** Sentinel gate validates readiness (know ≥ 0.70, uncertainty ≤ 0.35).
**POSTFLIGHT:** AI measures what it learned, creating a learning delta.
### Learning Compounds Across Sessions
```
Session 1: know=0.40 → know=0.65 (Δ +0.25)
↓ (findings persisted)
Session 2: know=0.70 → know=0.85 (Δ +0.15)
↓ (compound learning)
Session 3: know=0.82 → know=0.92 (Δ +0.10)
```
Each session starts higher because learnings persist. No more re-investigating the same questions.
---
## Live Metacognitive Signal
With Claude Code hooks enabled, you see epistemic state in your terminal:
```
[empirica] ⚡94% │ 🎯3 ❓12/5 │ POSTFLIGHT │ K:95% U:5% C:92% │ ✓ │ ✓ stable
```
**What this tells you:**
- **⚡94%** — Overall epistemic confidence (⚡ high, 💡 good, 💫 uncertain, 🌑 low)
- **🎯3 ❓12/5** — Open goals (3) and unknowns (12 total, 5 blocking goals)
- **POSTFLIGHT** — CASCADE phase (PREFLIGHT → CHECK → POSTFLIGHT)
- **K:95% U:5% C:92%** — Knowledge, Uncertainty, Context scores
- **✓** / **⚠** / **△** — Learning delta summary (net positive / net negative / neutral)
- **✓ stable** — Drift indicator (✓ stable, ⚠ drifting, ✗ severe)
---
## Built With Empirica
Projects using Empirica's epistemic foundations:
| Project | Description | Use Case |
|---------|-------------|----------|
| **[Docpistemic](https://github.com/Nubaeon/docpistemic)** | Epistemic documentation system | Self-aware documentation that tracks what it explains well vs. poorly |
| **[Carapace](https://github.com/Nubaeon/carapace)** | Defensive AI shell | Security-focused AI wrapper with epistemic safety gates |
| **[Empirica CRM](https://github.com/Nubaeon/empirica-crm)** | Customer relationship management | CRM where AI knows its confidence about customer insights |
**Building something with Empirica?** Open an issue to get listed here.
---
## What's New in 1.5.4
- **Autonomy Calibration Loop** — Adaptive transaction nudging based on your actual working patterns (3-point closed loop: PREFLIGHT, Sentinel, POSTFLIGHT)
- **Subagent Governance** — CASCADE exemption for subagents, delegated work counting, pre-spawn budget checks, turn ceiling enforcement
- **Release Pipeline Enhancement** — empirica-mcp build/publish integrated into release.py, Chocolatey and CANONICAL_CORE version sync
- **Stale Transaction Detection** — Status-only detection prevents blocking on orphaned transactions
- **Lifecycle Cleanup** — Automatic cleanup of active_work, compact_handoff, and instance_projects files
---
## Privacy & Data
**Your data stays local:**
- `.empirica/` — Local SQLite database (gitignored by default)
- `.git/refs/notes/empirica/*` — Epistemic checkpoints (local unless you push)
- Qdrant runs locally if enabled
No cloud dependencies. No telemetry. Your epistemic data is yours.
---
## Community & Support
- **Website:** [getempirica.com](https://getempirica.com)
- **Issues:** [GitHub Issues](https://github.com/Nubaeon/empirica/issues)
- **Discussions:** [GitHub Discussions](https://github.com/Nubaeon/empirica/discussions)
---
## License
MIT License — Maximum adoption, aligned with Empirica's transparency principles.
See [LICENSE](LICENSE) for details.
---
**Author:** David S. L. Van Assche
**Version:** 1.5.4
*Turtles all the way down — built with its own epistemic framework, measuring what it knows at every step.*
| text/markdown | David S. L. Van Assche | null | null | null | null | ai, llm, epistemic, self-assessment, metacognition, calibration | [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Libraries :: Python Modules"
] | [] | null | null | >=3.10 | [] | [] | [] | [
"pydantic>=2.4.0",
"pydantic-settings>=2.0",
"sqlalchemy>=2.0",
"pyyaml>=6.0",
"aiofiles>=23.0",
"jsonschema>=4.0",
"httpx>=0.24",
"requests>=2.31.0",
"cryptography>=44.0.1",
"gitpython>=3.1.41",
"anthropic>=0.39.0",
"tiktoken>=0.5.0",
"rich>=13.0",
"google-generativeai>=0.5",
"typer>=0.9",
"flask>=3.0; extra == \"api\"",
"flask-cors>=4.0.2; extra == \"api\"",
"werkzeug>=3.1.5; extra == \"api\"",
"fastapi>=0.115.0; extra == \"api\"",
"uvicorn>=0.24; extra == \"api\"",
"qdrant-client>=1.7; extra == \"vector\"",
"pytesseract>=0.3; extra == \"vision\"",
"pillow>=11.3.0; extra == \"vision\"",
"opencv-contrib-python>=4.12.0; extra == \"vision\"",
"mcp>=1.0.0; extra == \"mcp\"",
"empirica[api,mcp,vector,vision]; extra == \"all\"",
"pytest>=7.4; extra == \"test\"",
"pytest-asyncio>=0.21; extra == \"test\"",
"pytest-cov>=4.1; extra == \"test\"",
"pytest-mock>=3.11; extra == \"test\"",
"dirty-equals>=0.7; extra == \"test\"",
"ruff>=0.1.0; extra == \"lint\"",
"pyright>=1.1.330; extra == \"typecheck\"",
"empirica[lint,test,typecheck]; extra == \"dev\""
] | [] | [] | [] | [] | twine/6.2.0 CPython/3.13.7 | 2026-02-20T19:07:54.847674 | empirica-1.5.4.tar.gz | 1,131,357 | f4/5a/631e45a3fe5fd0b26263901402fc7d904e5c65eb38a06bbd6b7ac1b611b8/empirica-1.5.4.tar.gz | source | sdist | null | false | 49f3b700101aca6f878adc7f3d238913 | da659824df53559a8f55f6cfedd64160d6be29424214b98937a4a6a98ea47f2c | f45a631e45a3fe5fd0b26263901402fc7d904e5c65eb38a06bbd6b7ac1b611b8 | MIT | [
"LICENSE"
] | 227 |
2.4 | plot-finder | 0.3.0 | Query Polish ULDK (GUGiK) API to find land parcels by TERYT ID or coordinates | # plot-finder







> Python library to find Polish land parcels and analyze their surroundings.
Query the [ULDK (GUGiK)](https://uldk.gugik.gov.pl/) API to get parcel data by TERYT ID or coordinates, then analyze nearby infrastructure using OpenStreetMap.

## Installation
```bash
pip install plot-finder # base
pip install plot-finder[viz] # + interactive maps & PNG export
pip install plot-finder[ai] # + AI-powered analysis (OpenAI)
```
**Requirements:** Python 3.10+ | `pydantic` `httpx` `shapely` `pyproj`
## Quick Start
```python
from plot_finder import Plot, PlotAnalyzer, PlotReporter
# Find a parcel
plot = Plot(plot_id="141201_1.0001.6509")
print(plot.voivodeship) # mazowieckie
print(plot.centroid) # (x, y)
# Analyze surroundings
analyzer = PlotAnalyzer(plot, radius=3000)
for place in analyzer.education():
print(f"{place.name} — {place.distance_m}m, walk {place.walk_min}min")
# Full report
report = PlotReporter(analyzer).report()
report.model_dump_json()
# Visualization (pip install plot-finder[viz])
from plot_finder.visualizer import PlotVisualizer
viz = PlotVisualizer(report)
viz.save("map.html") # interactive map
viz.save("map.png") # static image
```
## Documentation
Full documentation: [ernestilchenko.github.io/plot-finder](https://ernestilchenko.github.io/plot-finder/)
## License
MIT — use it however you want.
| text/markdown | Ernest Ilchenko | null | null | null | null | uldk, gugik, parcel, plot, geodesy, poland, teryt | [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent"
] | [] | null | null | >=3.10 | [] | [] | [] | [
"pydantic>=2.0",
"httpx>=0.24",
"shapely>=2.0",
"pyproj>=3.6",
"astral>=3.2",
"folium>=0.14; extra == \"viz\"",
"Pillow>=9.0; extra == \"viz\"",
"openai>=1.0; extra == \"ai\"",
"beautifulsoup4>=4.12; extra == \"geo\""
] | [] | [] | [] | [
"Homepage, https://github.com/ernestilchenko/plot-finder",
"Documentation, https://ernestilchenko.github.io/plot-finder/"
] | twine/6.2.0 CPython/3.13.0 | 2026-02-20T19:07:43.439369 | plot_finder-0.3.0.tar.gz | 23,272 | cb/33/db0fad356647712190bc5f1644c4ab783b3fe48a9d3dc066d660dda01b57/plot_finder-0.3.0.tar.gz | source | sdist | null | false | 02412e7d6d42184e427f606c095314b1 | b0ebf608831cdd4614d6bdd66b40839b27a0cdbfbcc43ff59157396ca2bfbc5f | cb33db0fad356647712190bc5f1644c4ab783b3fe48a9d3dc066d660dda01b57 | MIT | [
"LICENSE"
] | 197 |
2.4 | plottini | 2026.2.0 | A user-friendly graph builder with matplotlib backend for creating publication-quality plots from TSV data | # Plottini
**A user-friendly graph builder for creating publication-quality plots from TSV data**
[](https://badge.fury.io/py/plottini)
[](https://www.python.org/downloads/)
[](https://opensource.org/licenses/MIT)
---
## Overview
Plottini is designed for researchers, scientists, and anyone who needs to create high-quality graphs from tabular data without writing code. With an intuitive web-based UI powered by NiceGUI and matplotlib as the rendering backend, Plottini makes it easy to:
- Load TSV data files with automatic validation
- Create various chart types (line, bar, scatter, histogram, and more)
- Apply mathematical transformations to your data
- Overlay multiple datasets on the same plot
- Export publication-ready figures in PNG, SVG, PDF, or EPS formats
---
## Features
### Core Capabilities
- **Multiple data sources**: Load one or more TSV files with configurable headers and comment delimiters
- **Rich chart types**: Line, Bar, Pie, Scatter, Histogram, Polar, Box, Violin, Area, and more
- **Data transformations**: Apply preset functions (log, sqrt, power, trig functions) to your data
- **Derived columns**: Create computed columns using safe mathematical expressions
- **Data filtering**: Filter rows by value ranges before plotting
- **Multi-file alignment**: Align multiple datasets by a common column
- **Secondary Y-axis**: Display two different scales on the same plot
- **Live preview**: See your changes in real-time as you configure your plot
- **Publication quality**: Colorblind-safe palettes and professional styling by default
### Export Options
- **Formats**: PNG, SVG, PDF, EPS
- **Configurable DPI**: High-resolution output for publications
- **Vector formats**: Scalable graphics for presentations and papers
### Advanced Features
- **Configuration files**: Expert users can use TOML files for reproducible workflows
- **Headless rendering**: Batch processing without the UI
- **Detailed error messages**: Clear, actionable feedback for data issues
---
## Installation
### From PyPI
```bash
pip install plottini
```
### From Source
```bash
git clone https://github.com/lanthoor/plottini.git
cd plottini
pip install -e .
```
---
## Quick Start
### Start the UI
```bash
plottini
```
This will start the web interface on `http://localhost:8050` and automatically open it in your browser.
### Command-Line Options
```bash
# Start on a specific port
plottini --port 8080
# Don't open browser automatically
plottini --no-open
# Load a configuration file
plottini --config my-graph.toml
```
### Expert Mode: Headless Rendering
For automation and batch processing:
```bash
plottini render --config my-graph.toml --output figure.png
```
---
## Usage
### 1. Load Your Data
- Click **"+ Add Files"** to load one or more TSV files
- Toggle **"Has header row"** if your files have column names
- Set comment characters (default: `#`)
### 2. Preview Your Data
- View a paginated table of your parsed data
- Verify that all values were correctly interpreted as numbers
### 3. Configure Series
- Select which columns to plot on X and Y axes
- Choose colors, line styles, and markers
- Apply transformations (log scale, square root, etc.)
- Use secondary Y-axis for different scales
### 4. Customize Plot Settings
- Select chart type
- Add title and axis labels
- Configure grid, legend, and figure size
- Adjust font sizes for publication
### 5. Advanced Options
- **Derived Columns**: Create new columns from expressions like `col1 / col2`
- **Filters**: Exclude data outside specified ranges
- **Multi-file Alignment**: Merge datasets by a common column
- **Layout**: Overlay series or create separate subplots
### 6. Export
- Choose format: PNG, SVG, PDF, or EPS
- Set DPI for raster formats
- Click **"Export"** to save your figure
---
## Configuration File Format
For reproducible workflows, you can create a TOML configuration file:
```toml
# my-graph.toml
[[files]]
path = "data/experiment1.tsv"
has_header = true
comment_chars = ["#"]
[[series]]
x = "time"
y = "velocity"
label = "Experiment 1"
color = "#0072B2"
transform_y = "log10"
[plot]
type = "line"
title = "Velocity over Time"
x_label = "Time (s)"
y_label = "Velocity (m/s)"
figure_width = 10.0
figure_height = 6.0
[export]
format = "png"
dpi = 300
```
Load it with:
```bash
plottini --config my-graph.toml
```
Or render directly:
```bash
plottini render --config my-graph.toml --output velocity.png
```
See [PLAN.md](PLAN.md) for the complete configuration specification.
---
## Supported Chart Types
| Category | Chart Types |
|----------|-------------|
| **Basic** | Line, Scatter, Bar (vertical/horizontal) |
| **Statistical** | Histogram, Box plot, Violin plot |
| **Area** | Area, Stacked area |
| **Specialized** | Stem, Step, Error bar, Pie, Polar |
---
## Mathematical Transformations
Available preset transformations:
- **Logarithmic**: log, log10, log2
- **Power**: square, cube, sqrt, cbrt
- **Trigonometric**: sin, cos, tan, arcsin, arccos, arctan
- **Other**: abs, inverse (1/x), exp, negate
**Derived Columns**: Create custom expressions like:
- `col1 / col2`
- `sqrt(col1**2 + col2**2)`
- `0.5 * mass * velocity**2`
---
## Requirements
- Python 3.10 or higher
- matplotlib ≥ 3.7
- numpy ≥ 1.24
- nicegui ≥ 1.4
- click ≥ 8.1
---
## Documentation
- **[PLAN.md](PLAN.md)** - Complete implementation plan and technical specifications
- **[CONTRIBUTING.md](CONTRIBUTING.md)** - Development setup and contribution guidelines
- **[AGENTS.md](AGENTS.md)** - Instructions for AI agents working on the project
---
## Contributing
Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for:
- Development setup instructions
- Code style guidelines
- Testing requirements
- Pull request process
---
## Roadmap
See [PLAN.md](PLAN.md) for the detailed implementation plan.
### Current Status: Phase 5 - Polish & Testing
- [x] Project structure
- [x] Package configuration
- [x] CLI framework
- [x] CI/CD pipelines
- [x] TSV Parser implementation
- [x] DataFrame implementation
- [x] Basic plotting (Line, Bar, Pie)
- [x] Extended charts (Scatter, Histogram, Polar, Box, Violin, Area, etc.)
- [x] Export functionality (PNG, SVG, PDF, EPS)
- [x] Data transformations and derived columns
- [x] Multi-file support and alignment
- [x] Secondary Y-axis support
- [x] Configuration system (TOML)
- [x] UI implementation with NiceGUI
- [x] Headless render mode
- [ ] Final documentation and polish
---
## License
MIT License - see [LICENSE](LICENSE) file for details.
Copyright (c) 2025 Lallu Anthoor
---
## Support
- **Issues**: [GitHub Issues](https://github.com/lanthoor/plottini/issues)
- **Discussions**: [GitHub Discussions](https://github.com/lanthoor/plottini/discussions)
- **Author**: Lallu Anthoor (dev@spendly.co.in)
---
## Acknowledgments
Built with:
- [matplotlib](https://matplotlib.org/) - The plotting backend
- [NiceGUI](https://nicegui.io/) - The web UI framework
- [Click](https://click.palletsprojects.com/) - CLI framework
- [NumPy](https://numpy.org/) - Numerical computing
---
**Plottini** - Making publication-quality graphs accessible to everyone.
| text/markdown | null | Lallu Anthoor <dev@spendly.co.in> | null | Lallu Anthoor <dev@spendly.co.in> | MIT | chart, data, graph, matplotlib, plot, tsv, visualization | [
"Development Status :: 3 - Alpha",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Scientific/Engineering :: Visualization"
] | [] | null | null | >=3.10 | [] | [] | [] | [
"click>=8.1",
"matplotlib>=3.7",
"numpy>=1.24",
"streamlit>=1.30",
"tomli-w>=1.0",
"tomli>=2.0; python_version < \"3.11\"",
"mypy>=1.0; extra == \"dev\"",
"pytest-cov>=4.0; extra == \"dev\"",
"pytest>=7.0; extra == \"dev\"",
"ruff>=0.1; extra == \"dev\"",
"twine>=4.0; extra == \"dev\""
] | [] | [] | [] | [
"Homepage, https://github.com/lanthoor/plottini",
"Documentation, https://github.com/lanthoor/plottini#readme",
"Repository, https://github.com/lanthoor/plottini",
"Issues, https://github.com/lanthoor/plottini/issues"
] | twine/6.1.0 CPython/3.13.7 | 2026-02-20T19:07:20.467945 | plottini-2026.2.0.tar.gz | 88,735 | 9f/f0/1f43426960b85130ac23aaa55dd5de559e2ca0bcb0d4497937165884b9e9/plottini-2026.2.0.tar.gz | source | sdist | null | false | f8af3549f454a6f4b13e584a3fbebb76 | 03ce4d8128bf840e12a7630f025644a0df2508aeb5d9cc9d166653606df7b251 | 9ff01f43426960b85130ac23aaa55dd5de559e2ca0bcb0d4497937165884b9e9 | null | [
"LICENSE"
] | 199 |
2.4 | stix-shifter-utils | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:06:18.104310 | stix_shifter_utils-8.1.0-py3-none-any.whl | 99,060 | 5a/11/77a258b2d3510d30e6b05dd40660c338efda28830f2cb59ebb68e96c23b3/stix_shifter_utils-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | fed9a415109286d25807c860c2a5c9b3 | bc4ae05972228451bd67f9d3d78d22dbefe5e792a19b6ea052c94c1e122e46c7 | 5a1177a258b2d3510d30e6b05dd40660c338efda28830f2cb59ebb68e96c23b3 | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 89 |
2.4 | stix-shifter-modules-vectra | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [
"pyparsing==3.0.9"
] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:06:17.187598 | stix_shifter_modules_vectra-8.1.0-py3-none-any.whl | 52,046 | 77/ae/552ff7fea1cf9d4fdaf0d9dba84883f9004fcf6f47e8e553ec2fecbe701c/stix_shifter_modules_vectra-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | 1eb85c77ee3ba13e3718df4799314538 | b7bb0184a550349ff029430a42943541962eb05374f6b33eee804b484eadcff9 | 77ae552ff7fea1cf9d4fdaf0d9dba84883f9004fcf6f47e8e553ec2fecbe701c | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 81 |
2.4 | stix-shifter-modules-trendmicro-vision-one | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:06:16.230543 | stix_shifter_modules_trendmicro_vision_one-8.1.0-py3-none-any.whl | 39,782 | 2e/e6/5c278587dfd902b322e9f53877790d5bb9e9cc22e5389db460d77c02af62/stix_shifter_modules_trendmicro_vision_one-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | 16c94a37dc0faff4a4af35414c471696 | 63b98aaf438672ec6a68c77951f45c216b13319422907860c05a6f1f61c9eac8 | 2ee65c278587dfd902b322e9f53877790d5bb9e9cc22e5389db460d77c02af62 | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 86 |
2.4 | stix-shifter-modules-trellix-endpoint-security-hx | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:06:15.307513 | stix_shifter_modules_trellix_endpoint_security_hx-8.1.0-py3-none-any.whl | 45,549 | b4/69/40a846dbb3092c6e1a986878f7a3d197649ea31ad3a48e5f00c32cdb8bd4/stix_shifter_modules_trellix_endpoint_security_hx-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | cb335461e3a71289f1d1fd7c20370aa3 | 15998ffbbd8291e9a4a88e8d3c3ae767f1ac98d230695d9ab97496680a546ece | b46940a846dbb3092c6e1a986878f7a3d197649ea31ad3a48e5f00c32cdb8bd4 | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 80 |
2.4 | vector-memory-mcp | 1.9.3 | A secure, vector-based memory server for Claude Desktop using sqlite-vec and sentence-transformers | # Vector Memory MCP Server
A **secure, vector-based memory server** for Claude Desktop using `sqlite-vec` and `sentence-transformers`. This MCP server provides persistent semantic memory capabilities that enhance AI coding assistants by remembering and retrieving relevant coding experiences, solutions, and knowledge.
## ✨ Features
- **🔍 Semantic Search**: Vector-based similarity search using 384-dimensional embeddings
- **🏷️ Semantic Normalization**: Auto-merge similar tags, normalize categories, structured colon tags
- **📊 IDF Tag Weights**: Frequency-based weighting for improved search relevance
- **💾 Persistent Storage**: SQLite database with vector indexing via `sqlite-vec`
- **🔒 Security First**: Input validation, path sanitization, and resource limits
- **⚡ High Performance**: Fast embedding generation with `sentence-transformers`
- **🧹 Auto-Cleanup**: Intelligent memory management and cleanup tools
- **📈 Rich Statistics**: Comprehensive memory database analytics
- **🔄 Automatic Deduplication**: SHA-256 content hashing prevents storing duplicate memories
- **🧠 Smart Cleanup Algorithm**: Prioritizes memory retention based on recency, access patterns, and importance
## 🛠️ Technical Stack
| Component | Technology | Purpose |
|-----------|------------|---------|
| **Vector DB** | sqlite-vec | Vector storage and similarity search |
| **Embeddings** | sentence-transformers/all-MiniLM-L6-v2 | 384D text embeddings |
| **Normalization** | Semantic similarity + guards | Tag/category auto-merge |
| **MCP Framework** | FastMCP | High-level tools-only server |
| **Dependencies** | uv script headers | Self-contained deployment |
| **Security** | Custom validation | Path/input sanitization |
| **Testing** | pytest + coverage | Comprehensive test suite |
## 📁 Project Structure
```
vector-memory-mcp/
├── main.py # Main MCP server entry point
├── README.md # This documentation
├── requirements.txt # Python dependencies
├── pyproject.toml # Modern Python project config
├── .python-version # Python version specification
├── claude-desktop-config.example.json # Claude Desktop config example
│
├── src/ # Core package modules
│ ├── __init__.py # Package initialization
│ ├── models.py # Data models & configuration
│ ├── security.py # Security validation & sanitization
│ ├── embeddings.py # Sentence-transformers wrapper
│ ├── memory_store.py # SQLite-vec operations
│ ├── README_AGENTS.md # Agent documentation (4 levels)
│ └── CASES_AGENTS.md # Use cases for Brain ecosystem
│
└── .gitignore # Git exclusions
```
## 🗂️ Organization Guide
This project is organized for clarity and ease of use:
- **`main.py`** - Start here! Main server entry point
- **`src/`** - Core implementation (security, embeddings, memory store)
- **`claude-desktop-config.example.json`** - Configuration template
**New here?** Start with `main.py` and `claude-desktop-config.example.json`
## 🚀 Quick Start
### Prerequisites
- Python 3.10 or higher (recommended: 3.11)
- [uv](https://docs.astral.sh/uv/) package manager
- Claude Desktop app
**Installing uv** (if not already installed):
macOS and Linux:
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```
Verify installation:
```bash
uv --version
```
### Installation
#### Option 1: Quick Install via uvx (Recommended)
The easiest way to use this MCP server - no cloning or setup required!
**Once published to PyPI**, you can use it directly:
```bash
# Run without installation (like npx)
uvx vector-memory-mcp --working-dir /path/to/your/project
```
**Claude Desktop Configuration** (using uvx):
```json
{
"mcpServers": {
"vector-memory": {
"command": "uvx",
"args": [
"vector-memory-mcp",
"--working-dir",
"/absolute/path/to/your/project",
"--memory-limit",
"100000"
]
}
}
}
```
> **Note:** `--memory-limit` is optional. Omit it to use default 10,000 entries.
> **Note**: Publishing to PyPI is in progress. See [PUBLISHING.md](PUBLISHING.md) for details.
#### Option 2: Install from Source (For Development)
1. **Clone the project**:
```bash
git clone <repository-url>
cd vector-memory-mcp
```
2. **Install dependencies** (automatic with uv):
Dependencies are automatically managed via inline metadata in main.py. No manual installation needed.
To verify dependencies:
```bash
uv pip list
```
3. **Test the server**:
```bash
# Test with sample working directory
uv run main.py --working-dir ./test-memory
```
4. **Configure Claude Desktop**:
Copy the example configuration:
```bash
cp claude-desktop-config.example.json ~/path/to/your/config/
```
Open Claude Desktop Settings → Developer → Edit Config, and add (replace paths with absolute paths):
```json
{
"mcpServers": {
"vector-memory": {
"command": "uv",
"args": [
"run",
"/absolute/path/to/vector-memory-mcp/main.py",
"--working-dir",
"/your/project/path",
"--memory-limit",
"100000"
]
}
}
}
```
Important:
- Use absolute paths, not relative paths
- `--memory-limit` is optional (default: 10,000)
- For large projects, use 100,000-1,000,000
5. **Restart Claude Desktop** and look for the MCP integration icon.
#### Option 3: Install with pipx (Alternative)
```bash
# Install globally (once published to PyPI)
pipx install vector-memory-mcp
# Run
vector-memory-mcp --working-dir /path/to/your/project
```
**Claude Desktop Configuration** (using pipx):
```json
{
"mcpServers": {
"vector-memory": {
"command": "vector-memory-mcp",
"args": [
"--working-dir",
"/absolute/path/to/your/project",
"--memory-limit",
"100000"
]
}
}
}
```
## 📚 Usage Guide
### Available Tools
#### 1. `store_memory` - Store Knowledge
Store coding experiences, solutions, and insights:
```
Please store this memory:
Content: "Fixed React useEffect infinite loop by adding dependency array with [userId, apiKey]. The issue was that the effect was recreating the API call function on every render."
Category: bug-fix
Tags: ["react", "useEffect", "infinite-loop", "hooks"]
```
#### 2. `search_memories` - Semantic Search
Find relevant memories using natural language:
```
Search for: "React hook dependency issues"
```
#### 3. `list_recent_memories` - Browse Recent
See what you've stored recently:
```
Show me my 10 most recent memories
```
#### 4. `get_memory_stats` - Database Health
View memory database statistics:
```
Show memory database statistics
```
#### 5. `clear_old_memories` - Cleanup
Clean up old, unused memories:
```
Clear memories older than 30 days, keep max 1000 total
```
#### 6. `get_by_memory_id` - Retrieve Specific Memory
Get full details of a specific memory by its ID:
```
Get memory with ID 123
```
Returns all fields including content, category, tags, timestamps, access count, and metadata.
#### 7. `delete_by_memory_id` - Delete Memory
Permanently remove a specific memory from the database:
```
Delete memory with ID 123
```
Removes the memory from both metadata and vector tables atomically.
#### 8. `get_unique_tags` - List All Tags
Get all unique tags currently used in memories:
```
Show all unique tags
```
Returns sorted list of tags from memory metadata.
#### 9. `get_canonical_tags` - List Canonical Tags
Get all canonical (normalized) tags:
```
Show canonical tags
```
Returns the normalized tag forms after semantic merging. Useful for understanding tag consolidation.
#### 10. `get_tag_frequencies` - Tag Usage Statistics
Get frequency count for all canonical tags:
```
Show tag frequencies
```
Shows how often each tag is used. Higher frequency = more common tag.
#### 11. `get_tag_weights` - IDF Weights
Get IDF-based weights for search relevance:
```
Show tag weights
```
Returns weights calculated as `1 / log(1 + frequency)`:
- Common tags (api, auth) → lower weight (less discriminative)
- Rare tags (module:terminal) → higher weight (more discriminative)
#### 12. `cookbook` - Knowledge Base (CRITICAL)
**CRITICAL: READ THIS FIRST before using any other tools. Without this, you are operating blind.**
```
# FIRST: Initialize context (READ THIS FIRST)
mcp__vector-memory__cookbook()
# List available categories with keys
mcp__vector-memory__cookbook(include="categories")
# Cases by key (exact match)
mcp__vector-memory__cookbook(include="cases", case_category="gates-rules")
mcp__vector-memory__cookbook(include="cases", case_category="search")
# Search in cookbook
mcp__vector-memory__cookbook(include="cases", query="JWT token")
mcp__vector-memory__cookbook(include="docs", query="tag normalization", level=2)
# Pagination
mcp__vector-memory__cookbook(include="cases", query="task", limit=5, offset=0)
# Documentation by level
mcp__vector-memory__cookbook(include="docs", level=0) # Quick start
mcp__vector-memory__cookbook(include="docs", level=2) # Advanced patterns
# Full debug info
mcp__vector-memory__cookbook(include="all", level=3)
```
**Parameters:**
| Parameter | Values | Description |
|-----------|--------|-------------|
| `include` | "init", "docs", "cases", "categories", "all" | What to return (default "init") |
| `level` | 0-3 | Docs verbosity (default 0) |
| `case_category` | string | Filter cases by key (exact) or title (partial) |
| `query` | string | Text search in content |
| `limit` | 1-50 | Max results (default 10) |
| `offset` | int | Pagination offset (default 0) |
**Include Modes:**
| Mode | Returns |
|------|---------|
| `init` | FIRST READ - quick start + available resources |
| `docs` | Documentation by level |
| `cases` | Use case scenarios (filtered by category/query) |
| `categories` | List of categories with keys and descriptions |
| `all` | Everything combined |
**Docs Levels:**
| Level | Content |
|-------|---------|
| 0 | Identity & Quick Start |
| 1 | Practical Usage |
| 2 | Advanced Patterns |
| 3 | Architecture & Internals |
**Category Keys:**
| Key | Description |
|-----|-------------|
| `cookbook-usage` | How to use cookbook() tool |
| `store` | Store memories with deduplication |
| `search` | Multi-probe search, pre-task mining |
| `statistics` | Memory stats, tag frequencies |
| `task-management` | Memory integration with Task MCP |
| `brain-docs` | CLI docs indexing |
| `agent-coordination` | Brain delegation, multi-agent |
| `integration` | Multi-source knowledge, error recovery |
| `debugging` | Debug flow with memory capture |
| `cleanup` | Delete operations, cleanup by age |
| `gates-rules` | CRITICAL/HIGH priority rules |
| `task-integration` | Memory-Task workflow patterns |
**Case Categories:** Cookbook Usage, Store, Search, Statistics, Task Creation, Task Decomposition, Task Status, Brain Docs, Agent Coordination, Integration, Debugging, Cleanup
**Contains:** 4 documentation levels + 12 use case categories + Brain ecosystem reference.
### Memory Categories
| Category | Use Cases |
|----------|-----------|
| `code-solution` | Working code snippets, implementations |
| `bug-fix` | Bug fixes and debugging approaches |
| `architecture` | System design decisions and patterns |
| `learning` | New concepts, tutorials, insights |
| `tool-usage` | Tool configurations, CLI commands |
| `debugging` | Debugging techniques and discoveries |
| `performance` | Optimization strategies and results |
| `security` | Security considerations and fixes |
| `other` | Everything else |
## 🏷️ Semantic Normalization
The server automatically normalizes tags and categories using semantic similarity to maintain consistency.
### Tag Normalization
When storing memories, similar tags are merged into **canonical tags**:
| Input Tags | Canonical Result |
|------------|------------------|
| `api v2.0`, `api 2`, `API version 2` | `api v2.0` |
| `php8`, `PHP 8`, `php-8` | `php8` |
| `laravel`, `laravel framework` | `laravel` (with substring boost) |
### Merge Rules
**✅ Merges when:**
- Same version: `api v2.0` ↔ `api 2` (threshold 0.85)
- High similarity: `php8` ↔ `php 8` (threshold 0.90)
- Substring boost: `laravel` ⊂ `laravel framework` (+0.03 similarity)
**❌ Never merges:**
- Different versions: `api v1` ≠ `api v2`
- Different numbers: `php7` ≠ `php8`
- Structured vs plain: `type:refactor` ≠ `refactor`
- Same prefix, different suffix: `type:refactor` ≠ `type:bug`
- Stop-words: `api` ≠ `rest api`, `ui` ≠ `web ui`
### Structured Tags (Colon Tags)
Use structured tags for fine-grained organization:
```
["type:refactor", "priority:high", "domain:api", "module:auth"]
```
**Allowed prefixes:** `type`, `domain`, `strict`, `cognitive`, `batch`, `module`, `vendor`, `priority`, `scope`, `layer`
Invalid prefixes are rejected: `random:stuff` → removed
### Category Normalization
Categories are also normalized semantically. Short inputs use dictionary fallback:
| Input | Output |
|-------|--------|
| `bugfix`, `bug`, `fix` | `bug-fix` |
| `auth`, `sec` | `security` |
| `perf`, `opt` | `performance` |
| `debug` | `debugging` |
| `arch`, `design` | `architecture` |
### Thresholds
| Threshold | Value | Purpose |
|-----------|-------|---------|
| Tag merge | 0.90 | Default similarity for merge |
| Same version | 0.85 | Lower threshold for same-version tags |
| Substring boost | +0.03 | Boost for subset tags |
| Category | 0.50 | Category matching threshold |
| Min substring length | 4 | Minimum for substring boost |
### Stop-Words (No Substring Boost)
These tags never get substring boost (too generic):
```
api, ui, db, test, auth, infra, ci, cd, app, lib, sdk, cli, gui, web, sql, orm, log, cfg, env, dev, prod, stg
```
### Tag Hygiene Guidelines
**Good tags** (describe subject/domain):
```
["authentication", "laravel", "middleware", "api v2"]
```
**Bad tags** (describe tools/activities):
```
["phpstan", "ci", "tests", "run-migration"] # Don't use these
```
### IDF Tag Weights
Tags are weighted using IDF (Inverse Document Frequency):
```
weight = 1 / log(1 + frequency)
```
| Tag | Frequency | Weight | Interpretation |
|-----|-----------|--------|----------------|
| `api` | 50 | 0.26 | Very common, low discriminative power |
| `laravel` | 10 | 0.43 | Common, moderate discriminative power |
| `module:terminal` | 2 | 1.44 | Rare, high discriminative power |
Use `get_tag_weights` to see all weights. Rare tags boost search relevance more than common tags.
## 🔧 Configuration
### Command Line Arguments
The server supports the following arguments:
```bash
# Run with uv (recommended) - default 10,000 memory limit
uv run main.py --working-dir /path/to/project
# With custom memory limit for large projects
uv run main.py --working-dir /path/to/project --memory-limit 100000
# Working directory is where memory database will be stored
uv run main.py --working-dir ~/projects/my-project --memory-limit 500000
```
**Available Options:**
- `--working-dir` (required): Directory where memory database will be stored
- `--memory-limit` (optional): Maximum number of memory entries
- Default: 10,000 entries
- Minimum: 1,000 entries
- Maximum: 10,000,000 entries
- Recommended for large projects: 100,000-1,000,000
### Working Directory Structure
```
your-project/
├── memory/
│ └── vector_memory.db # SQLite database with vectors
├── src/ # Your project files
└── other-files...
```
### Security Limits
- **Max memory content**: 10,000 characters
- **Max total memories**: Configurable via `--memory-limit` (default: 10,000 entries)
- **Max search results**: 50 per query
- **Max tags per memory**: 10 tags
- **Path validation**: Blocks suspicious characters
## 🎯 Use Cases
### For Individual Developers
```
# Store a useful code pattern
"Implemented JWT refresh token logic using axios interceptors"
# Store a debugging discovery
"Memory leak in React was caused by missing cleanup in useEffect"
# Store architecture decisions
"Chose Redux Toolkit over Context API for complex state management because..."
```
### For Team Workflows
```
# Store team conventions
"Team coding style: always use async/await instead of .then() chains"
# Store deployment procedures
"Production deployment requires running migration scripts before code deploy"
# Store infrastructure knowledge
"AWS RDS connection pooling settings for high-traffic applications"
```
### For Learning & Growth
```
# Store learning insights
"Understanding JavaScript closures: inner functions have access to outer scope"
# Store performance discoveries
"Using React.memo reduced re-renders by 60% in the dashboard component"
# Store security learnings
"OWASP Top 10: Always sanitize user input to prevent XSS attacks"
```
## 🔍 How Semantic Search Works
The server uses **sentence-transformers** to convert your memories into 384-dimensional vectors that capture semantic meaning:
### Example Searches
| Query | Finds Memories About |
|-------|---------------------|
| "authentication patterns" | JWT, OAuth, login systems, session management |
| "database performance" | SQL optimization, indexing, query tuning, caching |
| "React state management" | useState, Redux, Context API, state patterns |
| "API error handling" | HTTP status codes, retry logic, error responses |
### Similarity Scoring
- **0.9+ similarity**: Extremely relevant, almost exact matches
- **0.8-0.9**: Highly relevant, strong semantic similarity
- **0.7-0.8**: Moderately relevant, good contextual match
- **0.6-0.7**: Somewhat relevant, might be useful
- **<0.6**: Low relevance, probably not helpful
## 📊 Database Statistics
The `get_memory_stats` tool provides comprehensive insights:
```json
{
"total_memories": 247,
"memory_limit": 100000,
"usage_percentage": 0.25,
"categories": {
"code-solution": 89,
"bug-fix": 67,
"learning": 45,
"architecture": 23,
"debugging": 18,
"other": 5
},
"recent_week_count": 12,
"database_size_mb": 15.7,
"health_status": "Healthy"
}
```
### Statistics Fields Explained
- **total_memories**: Current number of memories stored in the database
- **memory_limit**: Maximum allowed memories (configurable via --memory-limit, default: 10,000)
- **usage_percentage**: Database capacity usage (total_memories / memory_limit * 100)
- **categories**: Breakdown of memory count by category type
- **recent_week_count**: Number of memories created in the last 7 days
- **database_size_mb**: Physical size of the SQLite database file on disk
- **health_status**: Overall database health indicator based on usage and performance metrics
## 🛡️ Security Features
### Input Validation
- Sanitizes all user input to prevent injection attacks
- Removes control characters and null bytes
- Enforces length limits on all content
### Path Security
- Validates and normalizes all file paths
- Prevents directory traversal attacks
- Blocks suspicious character patterns
### Resource Limits
- Limits total memory count and individual memory size
- Prevents database bloat and memory exhaustion
- Implements cleanup mechanisms for old data
### SQL Safety
- Uses parameterized queries exclusively
- No dynamic SQL construction from user input
- SQLite WAL mode for safe concurrent access
## 🔧 Troubleshooting
### Common Issues
#### Server Not Starting
```bash
# Check if uv is installed
uv --version
# Test server manually
uv run main.py --working-dir ./test
# Check Python version
python --version # Should be 3.10+
```
#### Claude Desktop Not Connecting
1. Verify absolute paths in configuration
2. Check Claude Desktop logs: `~/Library/Logs/Claude/`
3. Restart Claude Desktop after config changes
4. Test server manually before configuring Claude
#### Memory Search Not Working
- Verify sentence-transformers model downloaded successfully
- Check database file permissions in memory/ directory
- Try broader search terms
- Review memory content for relevance
#### Performance Issues
- Run `get_memory_stats` to check database health
- Use `clear_old_memories` to clean up old entries
- Consider increasing hardware resources for embedding generation
### Debug Mode
Run the server manually to see detailed logs:
```bash
uv run main.py --working-dir ./debug-test
```
## 🚀 Advanced Usage
### Batch Memory Storage
Store multiple related memories by calling the tool multiple times through Claude Desktop interface.
### Memory Organization Strategies
#### By Project
Use tags to organize by project:
- `["project-alpha", "frontend", "react"]`
- `["project-beta", "backend", "node"]`
- `["project-gamma", "devops", "docker"]`
#### By Technology Stack
- `["javascript", "react", "hooks"]`
- `["python", "django", "orm"]`
- `["aws", "lambda", "serverless"]`
#### By Problem Domain
- `["authentication", "security", "jwt"]`
- `["performance", "optimization", "caching"]`
- `["testing", "unit-tests", "mocking"]`
### Integration with Development Workflow
#### Code Review Learnings
```
"Code review insight: Extract validation logic into separate functions for better testability and reusability"
```
#### Sprint Retrospectives
```
"Sprint retrospective: Using feature flags reduced deployment risk and enabled faster rollbacks"
```
#### Technical Debt Tracking
```
"Technical debt: UserService class has grown too large, needs refactoring into smaller domain-specific services"
```
## 📈 Performance Benchmarks
Based on testing with various dataset sizes:
| Memory Count | Search Time | Storage Size | RAM Usage |
|--------------|-------------|--------------|-----------|
| 1,000 | <50ms | ~5MB | ~100MB |
| 5,000 | <100ms | ~20MB | ~200MB |
| 10,000 | <200ms | ~40MB | ~300MB |
*Tested on MacBook Air M1 with sentence-transformers/all-MiniLM-L6-v2*
## 🔧 Advanced Implementation Details
### Database Indexes
The memory store uses 4 optimized indexes for performance:
1. **idx_category**: Speeds up category-based filtering and statistics
2. **idx_created_at**: Optimizes temporal queries and recent memory retrieval
3. **idx_content_hash**: Enables fast deduplication checks via SHA-256 hash lookups
4. **idx_access_count**: Improves cleanup algorithm efficiency by tracking usage patterns
### Deduplication System
Content deduplication uses SHA-256 hashing to prevent storing identical memories:
- Hash calculated on normalized content (trimmed, lowercased)
- Check performed before insertion
- Duplicate attempts return existing memory ID
- Reduces storage overhead and maintains data quality
### Access Tracking
Each memory tracks usage statistics for intelligent management:
- **access_count**: Number of times memory retrieved via search or direct access
- **last_accessed_at**: Timestamp of most recent access
- **created_at**: Original creation timestamp
- Used by cleanup algorithm to identify valuable vs. stale memories
### Cleanup Algorithm
Smart cleanup prioritizes memory retention based on multiple factors:
1. **Recency**: Newer memories are prioritized over older ones
2. **Access patterns**: Frequently accessed memories are protected
3. **Age threshold**: Configurable days_old parameter for hard cutoff
4. **Count limit**: Maintains max_memories cap by removing least valuable entries
5. **Scoring system**: Combines access_count and recency for retention decisions
## 🤝 Contributing
This is a standalone MCP server designed for personal/team use. For improvements:
1. **Fork** the repository
2. **Modify** as needed for your use case
3. **Test** thoroughly with your specific requirements
4. **Share** improvements via pull requests
## 📄 License
This project is released under the MIT License.
## 🙏 Acknowledgments
- **sqlite-vec**: Alex Garcia's excellent SQLite vector extension
- **sentence-transformers**: Nils Reimers' semantic embedding library
- **FastMCP**: Anthropic's high-level MCP framework
- **Claude Desktop**: For providing the MCP integration platform
---
**Built for developers who want persistent AI memory without the complexity of dedicated vector databases.**
| text/markdown | null | Xsaven <xsaven@gmail.com> | null | null | null | mcp, model-context-protocol, vector-search, sqlite, embeddings, semantic-search, claude, ai-memory | [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Scientific/Engineering :: Artificial Intelligence"
] | [] | null | null | >=3.10 | [] | [] | [] | [
"mcp>=0.3.0",
"sqlite-vec>=0.1.6",
"sentence-transformers>=2.2.2",
"requests>=2.28.0"
] | [] | [] | [] | [
"Homepage, https://github.com/xsaven/vector-memory-mcp",
"Repository, https://github.com/xsaven/vector-memory-mcp",
"Issues, https://github.com/xsaven/vector-memory-mcp/issues"
] | uv/0.8.12 | 2026-02-20T19:06:14.812622 | vector_memory_mcp-1.9.3.tar.gz | 86,592 | 42/ba/d8fa618feaa2d2a530a2b24023fcacca2fca893c6df0294a63b25c45c223/vector_memory_mcp-1.9.3.tar.gz | source | sdist | null | false | ca22560b3ff97adf66d70c4473334556 | b8b8fe47daf38490374b80e2517fc9f948758f025523b8d16164414c07d9546f | 42bad8fa618feaa2d2a530a2b24023fcacca2fca893c6df0294a63b25c45c223 | MIT | [
"LICENSE"
] | 212 |
2.4 | stix-shifter-modules-tanium | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:06:13.657303 | stix_shifter_modules_tanium-8.1.0-py3-none-any.whl | 51,316 | 5b/0f/69bdb70774c8646a710f5e049c1a9db85392c69d854dcaebf629b60c7728/stix_shifter_modules_tanium-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | 912a1d40b59a39f4a80a82e1c3f441b2 | b6a4fca670800e78dcb313e36c03fc1bf25f8cda0fc795d76426f2896b110775 | 5b0f69bdb70774c8646a710f5e049c1a9db85392c69d854dcaebf629b60c7728 | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 82 |
2.4 | stix-shifter-modules-sysdig | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:06:12.532602 | stix_shifter_modules_sysdig-8.1.0-py3-none-any.whl | 38,480 | 75/85/d54d06759b74d320a4af6f88184703a4319e106147e034e55b0a7729f77e/stix_shifter_modules_sysdig-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | 2898fba8c0e04dd47c9640b6df3388ff | a5208ede48d6eccb81561dd17026d9caf4a9f67138944933eb480cf1adf81cf4 | 7585d54d06759b74d320a4af6f88184703a4319e106147e034e55b0a7729f77e | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 84 |
2.4 | stix-shifter-modules-synchronous-template | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:06:11.590006 | stix_shifter_modules_synchronous_template-8.1.0-py3-none-any.whl | 33,308 | c7/41/b99ce90eeed258863da89d5b543941c5dc0fb9998bf7118db23f51ed6de7/stix_shifter_modules_synchronous_template-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | 73a54fd417c644b590441c15cb2f2673 | 3f88bf8209b04d3f8a4565aa9764d615b6544ec615fb9a4ab69d9ea7aef4741b | c741b99ce90eeed258863da89d5b543941c5dc0fb9998bf7118db23f51ed6de7 | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 88 |
2.4 | stix-shifter-modules-symantec-endpoint-security | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:06:10.686882 | stix_shifter_modules_symantec_endpoint_security-8.1.0-py3-none-any.whl | 66,960 | 42/cb/2f3038162fdfc969703934bddb028e051a6e3ae443d1c9b525faf99e1c6e/stix_shifter_modules_symantec_endpoint_security-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | 8b591af1a34d2c0cdac1b8bb321e4c9e | 96c9ebd887a0794a0b08c412ef3c8308c6d8f99d3229d7cc9fdc017c5da00e3b | 42cb2f3038162fdfc969703934bddb028e051a6e3ae443d1c9b525faf99e1c6e | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 83 |
2.4 | stix-shifter-modules-sumologic | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [
"sumologic-sdk==0.1.13"
] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:06:09.494022 | stix_shifter_modules_sumologic-8.1.0-py3-none-any.whl | 36,029 | e9/53/3738c211416efb22bf555d1de9cb08d5dc9eb1e1b11f2a7680aa62ead044/stix_shifter_modules_sumologic-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | 00e973e7d5f7672901c6aa23bd4e3d79 | ea97fad7cbebfcba5da85efdacfa992532105a457a16adefe4bcd4a57e655375 | e9533738c211416efb22bf555d1de9cb08d5dc9eb1e1b11f2a7680aa62ead044 | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 79 |
2.4 | stix-shifter-modules-stix-bundle | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:06:08.350853 | stix_shifter_modules_stix_bundle-8.1.0-py3-none-any.whl | 231,074 | 62/75/1e579b66e432ddb247034bf9173ed282fa11ed9361e3d1e8d71c7cc7c934/stix_shifter_modules_stix_bundle-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | 62dbae450a691c8953c2183c54beb70f | f71a07e133c130fd9b3614c4e912363a7ac202908b2dd6466845c1693f82b389 | 62751e579b66e432ddb247034bf9173ed282fa11ed9361e3d1e8d71c7cc7c934 | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 87 |
2.4 | stix-shifter-modules-splunk | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:06:07.057823 | stix_shifter_modules_splunk-8.1.0-py3-none-any.whl | 56,250 | 39/86/3f15fc9714f8bc8e7f4784eeb3bccd8d0f5b33889150bd03048c8dd25cb2/stix_shifter_modules_splunk-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | ba0bfd975af1ecb456c502f4c99b946c | 52bca778e982def31966f505b0f54064b559452fadcc52f33ff187affe950d79 | 39863f15fc9714f8bc8e7f4784eeb3bccd8d0f5b33889150bd03048c8dd25cb2 | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 86 |
2.4 | stix-shifter-modules-sentinelone | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:06:06.049450 | stix_shifter_modules_sentinelone-8.1.0-py3-none-any.whl | 49,200 | 8a/7e/e980d430a709e5b84a8a3d3e2409e47c4a19e9cfe2d2e6115b7fe8f4ad51/stix_shifter_modules_sentinelone-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | 51dbad30f5e6ba57eedc5e993c8320a3 | bdeacb981e4bb26235b466394816c67f59d85f402d86fc669b898835d226533b | 8a7ee980d430a709e5b84a8a3d3e2409e47c4a19e9cfe2d2e6115b7fe8f4ad51 | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 88 |
2.4 | stix-shifter-modules-security-advisor | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:06:05.133782 | stix_shifter_modules_security_advisor-8.1.0-py3-none-any.whl | 33,234 | 9d/f8/1ada0b37f871b30d0c001252720ab58d53c622563aa9fb4f0ac47cf372b8/stix_shifter_modules_security_advisor-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | c23ac029cd7bfcabcf84f10ed33b7a95 | da07ae248ecfa907f326a171ae6a20f046dbefef7179b69fc15fd0e442fdb627 | 9df81ada0b37f871b30d0c001252720ab58d53c622563aa9fb4f0ac47cf372b8 | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 85 |
2.4 | stix-shifter-modules-secretserver | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:06:03.967348 | stix_shifter_modules_secretserver-8.1.0-py3-none-any.whl | 33,927 | 04/ef/fdf3ac288ff5a399f6ea930c86161d68c67c3cb7304d8679ab4a68508d3c/stix_shifter_modules_secretserver-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | 183ad46646ca054fdf4966ead0071747 | 38e2d754ef97b72ce310c9f2045dbbda3a64c963442de128cdf44e67ce8be50d | 04effdf3ac288ff5a399f6ea930c86161d68c67c3cb7304d8679ab4a68508d3c | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 84 |
2.4 | stix-shifter-modules-rhacs | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:06:03.054714 | stix_shifter_modules_rhacs-8.1.0-py3-none-any.whl | 37,440 | ae/6d/90aaf49b018ec5390b683017401b73939f077b691b723692e7d51dbb7e08/stix_shifter_modules_rhacs-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | be9ea6a8fe96784e7e5be409b883756c | dd5c4d7650a57150aab80c356bbce15eea97b9b51f003c2acd195976bb3c1782 | ae6d90aaf49b018ec5390b683017401b73939f077b691b723692e7d51dbb7e08 | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 85 |
2.4 | stix-shifter-modules-reversinglabs | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:06:02.189941 | stix_shifter_modules_reversinglabs-8.1.0-py3-none-any.whl | 36,895 | 8d/b8/cbd00c15a5928e56c4d082dfbb4cbf9732f697208cdb1fe789d0b6666884/stix_shifter_modules_reversinglabs-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | 26bb04b18cf0fe0d3d731250497cf0eb | acb7877e609defdd8e73747aea0ced978d914c998e7815a7fa2e86ad8506cfc8 | 8db8cbd00c15a5928e56c4d082dfbb4cbf9732f697208cdb1fe789d0b6666884 | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 84 |
2.4 | typecheck-runner | 0.1.6 | Unified api to multiple typecheckers | <!-- markdownlint-disable MD041 -->
<!-- prettier-ignore-start -->
[![Repo][repo-badge]][repo-link]
[![PyPI license][license-badge]][license-link]
[![PyPI version][pypi-badge]][pypi-link]
[![Code style: ruff][ruff-badge]][ruff-link]
[![uv][uv-badge]][uv-link]
<!--
For more badges, see
https://shields.io/category/other
https://naereen.github.io/badges/
[pypi-badge]: https://badge.fury.io/py/typecheck-runner
-->
[ruff-badge]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
[ruff-link]: https://github.com/astral-sh/ruff
[uv-badge]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json
[uv-link]: https://github.com/astral-sh/uv
[pypi-badge]: https://img.shields.io/pypi/v/typecheck-runner
[pypi-link]: https://pypi.org/project/typecheck-runner
[repo-badge]: https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff
[repo-link]: https://github.com/wpk-nist-gov/typecheck-runner
[license-badge]: https://img.shields.io/pypi/l/typecheck-runner?color=informational
[license-link]: https://github.com/wpk-nist-gov/typecheck-runner/blob/main/LICENSE
[changelog-link]: https://github.com/wpk-nist-gov/typecheck-runner/blob/main/CHANGELOG.md
<!-- other links -->
[mypy]: https://github.com/python/mypy
[pyright]: https://github.com/microsoft/pyright
[basedpyright]: https://github.com/DetachHead/basedpyright
[ty]: https://github.com/astral-sh/ty
[pyrefly]: https://github.com/microsoft/pyright
<!-- [pre-commit]: https://pre-commit.com/ -->
<!-- [prek]: https://github.com/j178/prek -->
<!-- prettier-ignore-end -->
# `typecheck-runner`
A unified way to run globally installed typecheckers against a specified virtual
environment.
## Overview
I prefer to invoke globally managed type checkers against specified virtual
environments. For cases where python versions are checked against (with, for
example tox or nox), this prevents each virtual environment from having to
contain a type checker. Each type checker ([mypy], [pyright], [basedpyright],
[ty], and [pyrefly]) has it's own particular flags to specify the python
executable and the python version. `typecheck-runner` unifies these flags. Also,
by default, `typecheck-runner` invokes the type checker using
[`uvx`](https://docs.astral.sh/uv/guides/tools/), which installs the type
checker if needed.
## Usage
### Install into virtual environment
The easiest way to use `typecheck-runner` is to install it into the virtual
environment you'd like to test against using something like
```bash
pip install typecheck-runner
```
from the virtual environment of interest. To invoke a type checker against the
virtual environment, assuming the python executable of the virtual environment
is located at `/path/to/venv/bin` with python version `3.13`, use
```bash
typecheck-runner --check mypy
# runs: uvx mypy --python-version=3.13 --python-executable=/path/to/venv/bin
```
Where the commented line shows the command run. Specifying `--no-uvx` will
instead invoke the type checker without `uvx`, so the type checker must already
be installed.
You can specify multiple checkers with multiple `--check` flags. To specify
options to `uvx` for each checker, pass options after `--uvx-delimiter` which
defaults to `--`. For example:
```bash
typecheck-runner --check "mypy --verbose -- --reinstall"
# runs: uvx --reinstall mypy --verbose
```
You can specify `uvx` options to all checkers using the `--uvx-options` flag.
### Specify virtual environment
You can also use a globally installed `typecheck-runner` and specify which
virtual environment to test over using `--venv` or `--infer-venv` options. For
example, you can use:
```bash
uvx typecheck-runner --venv .venv --check mypy
# run for example (if .venv current directory with version 3.14)
# uvx mypy --python-version=3.14 --python-executable=.venv/bin/python
```
Using `--infer-venv` will attempt to infer the virtual environment from, in
order, environment variables `VIRTUAL_ENV`, `CONDA_PREFIX`, and finally `.venv`
in current directory.
## Options
<!-- markdownlint-disable-next-line MD013 -->
<!-- [[[cog
import sys
sys.path.insert(0, ".")
from tools.cog_utils import wrap_command, get_pyproject, run_command, cat_lines
sys.path.pop(0)
]]] -->
<!-- [[[end]]] -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable MD013 -->
<!-- [[[cog run_command("typecheck-runner --help", include_cmd=False, wrapper="restructuredtext")]]] -->
```restructuredtext
usage: typecheck-runner [-h] [--version] [-c CHECKERS]
[--python-executable PYTHON_EXECUTABLE]
[--python-version PYTHON_VERSION] [--no-python-executable]
[--no-python-version] [--venv VENV] [--infer-venv]
[--constraints CONSTRAINTS] [-v] [--stdout] [--allow-errors]
[--fail-fast] [--dry-run] [--no-uvx] [--uvx-options UVX_OPTIONS]
[--uvx-delimiter UVX_DELIMITER]
[args ...]
Run executable using uvx.
positional arguments:
args Extra files/arguments passed to all checkers.
options:
-h, --help show this help message and exit
--version Display version.
-c, --check CHECKERS Checker to run. This can be a string with options to the
checker. For example, ``--check "mypy --verbose"`` runs the
checker the command ``mypy --verbose``. Options after
``uvx_delimiter`` (default ``"--"``, see ``--uvx-delimiter``
options) are treated as ``uvx`` options. For example, passing
``--check "mypy --verbose -- --reinstall"`` will run ``uvx
--reinstall mypy --verbose``. Can be specified multiple times.
--python-executable PYTHON_EXECUTABLE
Path to python executable. Defaults to ``sys.executable``. This
is passed to ``--python-executable`` (mypy), ``--pythonpath`` in
((based)pyright), ``--python`` (ty), ``--python-interpreter-
path`` (pyrefly), and ignored for pylint.
--python-version PYTHON_VERSION
Python version (x.y) to typecheck against. Defaults to
``{sys.version_info.major}.{sys.version_info.minor}``. This is
passed to ``--pythonversion`` in pyright and ``--python-
version`` otherwise.
--no-python-executable
Do not infer ``python_executable``
--no-python-version Do not infer ``python_version``.
--venv VENV Use specified vitualenvironment location
--infer-venv Infer virtual environment location. Checks in order environment
variables ``VIRTUAL_ENV``, ``CONDA_PREFIX``, directory
``.venv``.
--constraints CONSTRAINTS
Constraints (requirements.txt) specs for checkers. Can specify
multiple times. Passed to ``uvx --constraints=...``.
-v, --verbose Set verbosity level. Pass multiple times to up level.
--stdout logger information to stdout
--allow-errors If passed, return ``0`` regardless of checker status.
--fail-fast Exit on first failed checker. Default is to run all checkers,
even if they fail.
--dry-run Perform dry run.
--no-uvx If ``--no-uvx`` is passed, assume typecheckers are in the
current python environment. Default is to invoke typecheckers
using `uvx`.
--uvx-options UVX_OPTIONS
Extra options to pass to ``uvx``. Note that you may have to
escape the first option. For example, ``--uvx-options
"\--verbose --reinstall"
--uvx-delimiter UVX_DELIMITER
Delimiter between typechecker command arguments and ``uvx``
arguments. See ``--check`` option.
```
<!-- [[[end]]] -->
<!-- prettier-ignore-end -->
## Status
This package is actively used by the author. Please feel free to create a pull
request for wanted features and suggestions!
<!-- end-docs -->
## Installation
<!-- start-installation -->
Use one of the following
```bash
pip install typecheck-runner
uv pip install typecheck-runner
uv add typecheck-runner
...
```
<!-- end-installation -->
## What's new?
See [changelog][changelog-link].
## License
This is free software. See [LICENSE][license-link].
## Related work
Any other stuff to mention....
## Contact
The author can be reached at <wpk@nist.gov>.
## Credits
This package was created using
[Cookiecutter](https://github.com/audreyr/cookiecutter) with the
[usnistgov/cookiecutter-nist-python](https://github.com/usnistgov/cookiecutter-nist-python)
template.
| text/markdown | William P. Krekelberg | William P. Krekelberg <wpk@nist.gov> | null | null | null | typecheck-runner | [
"Development Status :: 2 - Pre-Alpha",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Utilities",
"Typing :: Typed"
] | [] | null | null | >=3.10 | [] | [] | [] | [
"packaging>=25.0"
] | [] | [] | [] | [
"Homepage, https://github.com/wpk-nist-gov/typecheck-runner"
] | twine/6.1.0 CPython/3.13.7 | 2026-02-20T19:06:01.279983 | typecheck_runner-0.1.6.tar.gz | 13,940 | 23/f3/0370a9fc99f924ac3598ad4eb1f8ec97c3ab491d79a172b466fae912fad8/typecheck_runner-0.1.6.tar.gz | source | sdist | null | false | 010d0d529d877d2df736e6e6ff1b36f9 | a97f7ce67bf6397fe0e0e4072c1813a8961dc8e8233d0745d2702c29cd61e88d | 23f30370a9fc99f924ac3598ad4eb1f8ec97c3ab491d79a172b466fae912fad8 | NIST-PD | [
"LICENSE"
] | 261 |
2.4 | stix-shifter-modules-reaqta | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:06:00.403804 | stix_shifter_modules_reaqta-8.1.0-py3-none-any.whl | 60,753 | 71/2a/38a744f0999071641b90905e088a75502a53fdab2b763ff27147f25af789/stix_shifter_modules_reaqta-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | 60d34088b5d4d9e655abb35f18255049 | c2fc8774ac12d48cc0e9fc117f486648bfb984e9c4a58b86a70bd8ecc18706b2 | 712a38a744f0999071641b90905e088a75502a53fdab2b763ff27147f25af789 | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 87 |
2.4 | stix-shifter-modules-qradar-perf-test | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:05:59.046463 | stix_shifter_modules_qradar_perf_test-8.1.0-py3-none-any.whl | 46,930 | fd/a5/8c63cf2742e4a5f7a74a9a55ce9325ab3059427b9faed32b07edb817020b/stix_shifter_modules_qradar_perf_test-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | d0e4bfda6fee64256227e57e513c19fb | 1f6d927c68174580fe9d28eca09be319a8def71ca7902b56ba324d8f28a2d388 | fda58c63cf2742e4a5f7a74a9a55ce9325ab3059427b9faed32b07edb817020b | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 85 |
2.4 | stix-shifter-modules-qradar | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:05:57.792128 | stix_shifter_modules_qradar-8.1.0-py3-none-any.whl | 55,150 | 18/48/7404c388219452148894353e712cf2b65c7098c9b062262f1daf504f87c0/stix_shifter_modules_qradar-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | 2107fb29c95711f8cfb1eab92956acc1 | cc7646d4a134dfd0f678ac1703c42b5646cd101a371ad299ed2460a0b3ba6aa5 | 18487404c388219452148894353e712cf2b65c7098c9b062262f1daf504f87c0 | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 90 |
2.4 | stix-shifter-modules-proxy | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:05:56.862480 | stix_shifter_modules_proxy-8.1.0-py3-none-any.whl | 23,293 | c5/5a/882aaa14cf657d1df42b09d0fcaa335d77fb8347c41c89e9cfeab4e5f72c/stix_shifter_modules_proxy-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | 9dcc6f99e65e736e6e1ea42d48adb725 | 6216f18288d85d665a6604d83ddb87e3ff34ae7e29216f5f0b37b3718d5787dd | c55a882aaa14cf657d1df42b09d0fcaa335d77fb8347c41c89e9cfeab4e5f72c | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 89 |
2.4 | stix-shifter-modules-proofpoint | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:05:54.892363 | stix_shifter_modules_proofpoint-8.1.0-py3-none-any.whl | 38,557 | 14/a4/b521bb209cc165c9ac56c5fe00bbc53388a976c27093fee68c3ede2a1b56/stix_shifter_modules_proofpoint-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | d7240e0a8af9f0f42516e2ba664091f7 | 2c944d6e611f2af07a803862e2da45945fc6ce1259cc3f60d445e4b73812480b | 14a4b521bb209cc165c9ac56c5fe00bbc53388a976c27093fee68c3ede2a1b56 | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 85 |
2.4 | stix-shifter-modules-paloalto | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:05:53.725900 | stix_shifter_modules_paloalto-8.1.0-py3-none-any.whl | 56,953 | 1d/22/1f21997f85e3abd5188117d6418268857153b36f04a10bfb3686e8c6ecaa/stix_shifter_modules_paloalto-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | ef343c8ae6f2e82bfbf2c99919736723 | f42eff9d69ddb9f69a699d762fa8e0bf7b4745bd2623e1f26bc404d4a60e5ca5 | 1d221f21997f85e3abd5188117d6418268857153b36f04a10bfb3686e8c6ecaa | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 85 |
2.4 | stix-shifter-modules-onelogin | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [
"onelogin==2.0.4"
] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:05:52.567665 | stix_shifter_modules_onelogin-8.1.0-py3-none-any.whl | 29,276 | 64/fe/fe85af1eb201b483229a9ad910510c79f1554bde88174c4d0767dc959dcb/stix_shifter_modules_onelogin-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | 165dc2ba106d80af461bb12ee2ee0423 | d73f60451bf8c3599b7eecd8b54252c5539b216038f9b47f57fca5215695445c | 64fefe85af1eb201b483229a9ad910510c79f1554bde88174c4d0767dc959dcb | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 83 |
2.4 | stix-shifter-modules-okta | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:05:51.704823 | stix_shifter_modules_okta-8.1.0-py3-none-any.whl | 38,951 | 15/33/c74b9158d9876a186693cedc87c0a58cfc78cf655e26aa96b0ff64d280d0/stix_shifter_modules_okta-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | c0a6b9b966f2f4965982728ac5de3dec | 8821db06a991a22cea750e3a2addb3052cd0436a06a6822b4eaeb093123e7547 | 1533c74b9158d9876a186693cedc87c0a58cfc78cf655e26aa96b0ff64d280d0 | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 83 |
2.4 | stix-shifter-modules-nozomi-vantage | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:05:50.768947 | stix_shifter_modules_nozomi_vantage-8.1.0-py3-none-any.whl | 43,270 | 42/0a/645b9bfdc040247824ad42ac548a02379a720f31f44c5ba9678a89487877/stix_shifter_modules_nozomi_vantage-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | 1e131b64e3da010dda30a1ba8eb366d0 | 2544c7c55fb125a0e5675a33f404a338233d9d771e1d6c026cab25366945549d | 420a645b9bfdc040247824ad42ac548a02379a720f31f44c5ba9678a89487877 | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 83 |
2.4 | stix-shifter-modules-mysql | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [
"mysql-connector-python==9.1.0"
] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:05:49.930360 | stix_shifter_modules_mysql-8.1.0-py3-none-any.whl | 31,879 | 5f/bb/9a0eedc210458cc3936b0477c1c65b3888ed80bae18aad3924a2a139adcb/stix_shifter_modules_mysql-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | 3d3d9a829915b467b9f80f2f7209a7b3 | 5d9e898119fc8adc4791df25cc4e18165e0c67b592d9f8af64752d4cb43e245a | 5fbb9a0eedc210458cc3936b0477c1c65b3888ed80bae18aad3924a2a139adcb | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 83 |
2.4 | stix-shifter-modules-msatp | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:05:48.520495 | stix_shifter_modules_msatp-8.1.0-py3-none-any.whl | 56,004 | c5/5c/0f15e43b761de95acb271968d2e0c2ce46215d31ecdf1ae3efa1f3fcb1ae/stix_shifter_modules_msatp-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | 154d75564a3b108aa850b6e60b81daab | 3619bfeb4a0583a64423c01404cc8980c6e60e5a6282ecf84f0203936eb66c85 | c55c0f15e43b761de95acb271968d2e0c2ce46215d31ecdf1ae3efa1f3fcb1ae | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 89 |
2.4 | stix-shifter-modules-infoblox | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:05:47.536293 | stix_shifter_modules_infoblox-8.1.0-py3-none-any.whl | 47,593 | f3/6d/2f3d3412afae972632f1c449c42fe6c04c9b655697a3be903ee4b6cca2c7/stix_shifter_modules_infoblox-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | 22e2f80d50b721e97f480afc67ae9aa3 | 36b5fd3edaa0e3f861f46bab54e4485204d85acf925b027a6e16843de6ab8f18 | f36d2f3d3412afae972632f1c449c42fe6c04c9b655697a3be903ee4b6cca2c7 | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 86 |
2.4 | vector-task-mcp | 1.7.3 | A secure, vector-based task management server for Claude Desktop using sqlite-vec and sentence-transformers | # Vector Task MCP Server
A **secure, vector-based task management server** for Claude Desktop using `sqlite-vec` and `sentence-transformers`. This MCP server provides intelligent task tracking with semantic search capabilities that enhance AI coding assistants by organizing and retrieving development tasks efficiently.
## ✨ Features
- **🔍 Semantic Search**: Vector-based task search using 384-dimensional embeddings
- **💾 Persistent Storage**: SQLite database with vector indexing via `sqlite-vec`
- **🏷️ Smart Organization**: Priorities, tags, and subtasks for better task management
- **📋 Task Lifecycle**: Track tasks from pending → in_progress → completed → tested → validated (or stopped)
- **🔐 Tag Normalization**: Automatic tag deduplication with semantic similarity
- **📊 IDF Weights**: Rare tags boost search relevance more than common tags
- **🎯 Tag Classification**: Filter tags vs boost tags for smart ranking
- **🔄 Alias Scent**: Original tag variants preserved for search context
- **🔒 Security First**: Input validation, path sanitization, and resource limits
- **⚡ High Performance**: Fast embedding generation with `sentence-transformers`
- **📈 Rich Statistics**: Comprehensive task analytics and progress tracking
- **🔄 Hierarchical Tasks**: Support for parent-child task relationships
- **📊 Priority Management**: Organize tasks by priority (low, medium, high, critical)
- **💬 Task Comments**: Add notes and updates to tasks without changing content
## 🛠️ Technical Stack
| Component | Technology | Purpose |
|-----------|------------|---------|
| **Vector DB** | sqlite-vec | Vector storage and similarity search |
| **Embeddings** | sentence-transformers/all-MiniLM-L6-v2 | 384D text embeddings |
| **MCP Framework** | FastMCP | High-level tools-only server |
| **Tag Normalization** | Custom (src/normalization.py) | Semantic tag deduplication |
| **Dependencies** | uv script headers | Self-contained deployment |
| **Security** | Custom validation | Path/input sanitization |
| **Testing** | pytest + coverage | Comprehensive test suite |
## 📁 Project Structure
```
vector-task-mcp/
├── main.py # Main MCP server entry point
├── README.md # This documentation
├── requirements.txt # Python dependencies
├── pyproject.toml # Modern Python project config
├── .python-version # Python version specification
├── claude-desktop-config.example.json # Claude Desktop config example
│
├── src/ # Core package modules
│ ├── __init__.py # Package initialization
│ ├── models.py # Data models & configuration
│ ├── security.py # Security validation & sanitization
│ ├── task_store.py # SQLite-vec task operations
│ ├── embeddings.py # Embedding model wrapper
│ └── normalization.py # Tag normalization & classification
│
├── tests/ # Test suite
│ ├── test_task_store.py # Task store tests
│ └── test_normalization.py # Normalization tests
│
└── .gitignore # Git exclusions
```
## 🗂️ Organization Guide
This project is organized for clarity and ease of use:
- **`main.py`** - Start here! Main server entry point
- **`src/`** - Core implementation (security, task storage)
- **`claude-desktop-config.example.json`** - Configuration template
**New here?** Start with `main.py` and `claude-desktop-config.example.json`
## 🚀 Quick Start
### Prerequisites
- Python 3.10 or higher (recommended: 3.11)
- [uv](https://docs.astral.sh/uv/) package manager
- Claude Desktop app
**Installing uv** (if not already installed):
macOS and Linux:
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```
Verify installation:
```bash
uv --version
```
### Installation
#### Option 1: Quick Install via uvx (Recommended)
The easiest way to use this MCP server - no cloning or setup required!
**Once published to PyPI**, you can use it directly:
```bash
# Run without installation (like npx)
uvx vector-task-mcp --working-dir /path/to/your/project
```
**Claude Desktop Configuration** (using uvx):
```json
{
"mcpServers": {
"vector-task": {
"command": "uvx",
"args": [
"vector-task-mcp",
"--working-dir",
"/absolute/path/to/your/project"
]
}
}
}
```
> **Note**: Publishing to PyPI is in progress.
#### Option 2: Install from Source (For Development)
1. **Clone the project**:
```bash
git clone <repository-url>
cd vector-task-mcp
```
2. **Install dependencies** (automatic with uv):
Dependencies are automatically managed via inline metadata in main.py. No manual installation needed.
To verify dependencies:
```bash
uv pip list
```
3. **Test the server**:
```bash
# Test with sample working directory
uv run main.py --working-dir ./test-tasks
```
4. **Configure Claude Desktop**:
Copy the example configuration:
```bash
cp claude-desktop-config.example.json ~/path/to/your/config/
```
Open Claude Desktop Settings → Developer → Edit Config, and add (replace paths with absolute paths):
```json
{
"mcpServers": {
"vector-task": {
"command": "uv",
"args": [
"run",
"/absolute/path/to/vector-task-mcp/main.py",
"--working-dir",
"/your/project/path"
]
}
}
}
```
Important:
- Use absolute paths, not relative paths
5. **Restart Claude Desktop** and look for the MCP integration icon.
#### Option 3: Install with pipx (Alternative)
```bash
# Install globally (once published to PyPI)
pipx install vector-task-mcp
# Run
vector-task-mcp --working-dir /path/to/your/project
```
**Claude Desktop Configuration** (using pipx):
```json
{
"mcpServers": {
"vector-task": {
"command": "vector-task-mcp",
"args": [
"--working-dir",
"/absolute/path/to/your/project"
]
}
}
}
```
## 📚 Usage Guide
### Available Tools
#### Task Creation & Management
**1. `task_create` - Create New Task**
```
Create a new task:
Title: "Implement user authentication"
Content: "Add JWT-based authentication with refresh tokens"
Priority: high
Tags: ["auth", "backend", "security"]
```
**2. `task_create_bulk` - Create Multiple Tasks**
```
Create multiple tasks at once for batch operations
```
**3. `task_update` - Update Task Fields**
```
Update task 123:
- Status: in_progress
- Priority: critical
- Title: "Updated title"
```
**4. `task_delete` - Delete Task**
```
Delete task with ID 123
```
**5. `task_delete_bulk` - Delete Multiple Tasks**
```
Delete tasks: [123, 124, 125]
```
#### Task Retrieval
**6. `task_list` - List Tasks with Filters**
```
List tasks:
- Status: pending
- Query: "authentication"
- Limit: 10
```
**7. `task_get` - Get Specific Task**
```
Get task with ID 123
```
**8. `task_last` - Get Last Created Task**
```
Show me the last task I created
```
**9. `task_next` - Get Next Task to Work On**
```
What should I work on next?
```
Returns in_progress task if any, otherwise next pending task.
#### Task Lifecycle
**10. `task_start` - Start Task**
```
Start working on task 123
```
Sets status to in_progress and records start time.
**11. `task_finish` - Complete Task**
```
Mark task 123 as completed
```
Sets status to completed and records finish time.
**12. `task_stop` - Stop Task**
```
Stop working on task 123
```
Sets status to stopped (can be resumed later).
**13. `task_resume` - Resume Stopped Task**
```
Resume task 123
```
Sets status back to in_progress.
#### Task Metadata
**14. `task_comment` - Add/Update Comment**
```
Add comment to task 123:
"Updated API endpoint to use v2, all tests passing"
```
**15. `task_add_tag` - Add Tag**
```
Add tag "urgent" to task 123
```
**16. `task_remove_tag` - Remove Tag**
```
Remove tag "urgent" from task 123
```
**17. `task_get_all_tags` - List All Tags**
```
Show all tags used in tasks
```
#### Task Statistics
**18. `task_stats` - Get Task Statistics**
```
Show task statistics
```
Returns:
```json
{
"total_tasks": 45,
"by_status": {
"pending": 20,
"in_progress": 3,
"completed": 20,
"stopped": 2
},
"with_subtasks": 5,
"next_task_id": 12
}
```
### Tag Normalization Tools
**19. `tag_normalize_preview` - Preview Tag Merges**
```
Preview which tags can be merged:
- threshold: 0.90 (strict) or 0.85 (aggressive)
```
Shows similar tags that can be merged into canonical forms.
**20. `tag_normalize_apply` - Apply Tag Normalization**
```
Apply tag normalization with optional dry_run
```
Merges variant tags into canonical forms and stores original variants in `tag_variants`.
**21. `tag_similarity` - Compare Two Tags**
```
Compare similarity between "auth" and "authentication"
```
Returns cosine similarity score (0.0-1.0).
**22. `canonical_tag_add` - Add Canonical Mapping**
```
Add mapping: "authentication" → "auth"
```
**23. `canonical_tag_remove` - Remove Mapping**
```
Remove mapping for "authentication"
```
**24. `canonical_tag_list` - List All Mappings**
```
List all canonical tag mappings
```
**25. `get_canonical_tags` - List Canonical Tags**
```
List all canonical tags only
```
### Tag Intelligence Tools
**26. `tag_frequencies` - Get Tag Frequencies & IDF Weights**
```
Get tag frequencies with IDF weights
```
Returns frequency statistics and IDF weights for search ranking:
```json
{
"api": {"count": 10, "frequency": 0.4, "idf_weight": 0.621},
"vendor:stripe": {"count": 1, "frequency": 0.04, "idf_weight": 1.443}
}
```
**27. `tag_weights` - Get Simplified IDF Weights**
```
Get IDF weights for all tags (for search ranking)
```
**28. `tag_classify` - Classify Single Tag**
```
Classify tag "vendor:stripe"
```
Returns boost level (high/medium/low/filter_only) for ranking.
**29. `tags_classify_batch` - Classify Multiple Tags**
```
Classify tags: ["vendor:stripe", "api", "status:pending"]
```
**30. `search_explain` - Search with Ranking Explanation**
```
Search for "authentication" with ranking explanation
```
Shows how IDF weights, classification, and variants affect ranking.
### Task Priorities
| Priority | Use Cases |
|----------|-----------|
| `critical` | Production bugs, security issues, blockers |
| `high` | Important features, major improvements |
| `medium` | Regular features, enhancements (default) |
| `low` | Nice-to-have, refactoring, documentation |
### Task Status Lifecycle
**Available statuses**: `pending`, `in_progress`, `completed`, `tested`, `validated`, `stopped`
```
pending → in_progress → completed → tested → validated
↓
stopped → (resume) → in_progress
```
| Status | Description |
|--------|-------------|
| `pending` | Task not yet started |
| `in_progress` | Currently being worked on |
| `completed` | Task finished (basic completion) |
| `tested` | Task completed and tested |
| `validated` | Task completed, tested, and validated |
| `stopped` | Task paused/blocked (can be resumed) |
## 🔧 Configuration
### Command Line Arguments
```bash
# Run with uv (recommended)
uv run main.py --working-dir /path/to/project
# Working directory is where task database will be stored
uv run main.py --working-dir ~/projects/my-project
```
**Available Options:**
- `--working-dir` (required): Directory where task database will be stored
### Working Directory Structure
```
your-project/
├── memory/
│ └── tasks.db # SQLite database with task vectors
├── src/ # Your project files
└── other-files...
```
### Database Schema
**tasks table**:
- Core task data + `tags` (canonical) + `tag_variants` (original variants)
**canonical_tags table**:
- Predefined tag mappings (variant → canonical)
**task_vectors table**:
- 384-dimensional embeddings for semantic search
### Security Limits
- **Max task content**: 10,000 characters
- **Max bulk create**: 50 tasks per operation
- **Max bulk delete**: 100 tasks per operation
- **Max tags per task**: 10 tags
- **Path validation**: Blocks suspicious characters
## 🎯 Use Cases
### For Individual Developers
```
# Track feature development
"Implement OAuth2 integration with Google and GitHub providers"
# Track bug fixes
"Fix memory leak in WebSocket connection handler"
# Track learning tasks
"Learn and implement Redis caching for API responses"
```
### For Team Workflows
```
# Sprint planning
"Sprint 23: Redesign user dashboard with new analytics"
# Code review tasks
"Review PR #456: Database migration for user preferences"
# Infrastructure tasks
"Set up CI/CD pipeline for automated testing and deployment"
```
### For Project Management
```
# Epic-level tasks
"User Management System" (parent task)
→ "User registration" (subtask)
→ "Email verification" (subtask)
→ "Password reset" (subtask)
# Milestone tracking
"v2.0 Release Preparation"
# Technical debt
"Refactor legacy authentication module to use new security library"
```
## 🏷️ Tag Normalization
### Overview
Tag normalization reduces tag fragmentation by merging semantically similar tags:
| Before | After |
|--------|-------|
| auth, authentication, auth-api, login | → **auth** |
| db, database, database-setup | → **database** |
| api, rest api, API | → **api** |
### Hard Guards (Prevent Wrong Merges)
| Guard | Rule | Example |
|-------|------|---------|
| **Version** | Different versions → NO | `php8` ≠ `php7` |
| **Numeric** | Different numbers → NO | `api1` ≠ `api2` |
| **Facet** | Different prefixes → NO | `type:*` ≠ `domain:*` |
| **Prefix** | Structured ≠ Plain | `type:refactor` ≠ `refactor` |
### Substring Boost
Tags that are substrings get a small boost if:
- Shorter word ≥ 4 characters
- Not in stop-words (api, ui, db, etc.)
Example: `"laravel"` ⊂ `"laravel framework"` → boost to 0.95
### Facet Model (Colon Tags)
Tags with colons (`prefix:value`) are treated as structured facets:
```
type:refactor ← facet: "type", value: "refactor"
vendor:stripe ← facet: "vendor", value: "stripe"
module:terminal ← facet: "module", value: "terminal"
```
Rules:
- Same prefix can merge if similar: `type:refactor` ↔ `type:refactoring` ✅
- Different prefixes never merge: `type:*` ↔ `domain:*` ❌
- Structured never merges with plain: `type:*` ↔ `refactor` ❌
### Tag Variants (Alias Scent)
When tags are migrated, original variants are preserved:
```json
{
"tags": ["auth"],
"tag_variants": ["authentication", "auth-api", "login"]
}
```
Variants provide:
- Context for search ranking
- Explanation in UI ("Why auth? Because was login/authentication")
- Rerank signal for queries
## 📊 IDF Weights & Tag Classification
### IDF (Inverse Document Frequency)
Rare tags boost relevance more than common tags:
```
idf_weight = 1 / log(1 + frequency)
```
| Tag | Count | IDF Weight | Effect |
|-----|-------|------------|--------|
| `api` | 70% of tasks | 0.38 | Low signal |
| `vendor:stripe` | 3% of tasks | 1.44 | Strong signal |
### Tag Classification
Tags are classified by boost level:
| Level | Boost | Examples |
|-------|-------|----------|
| `high` | 1.5 | `vendor:*`, `module:*`, `service:*` |
| `medium` | 1.0 | Facet tags (`domain:*`, `type:*`), specific tags |
| `low` | 0.5 | General tags (`api`, `backend`, `test`) |
| `filter_only` | 0.1 | `status:*`, `priority:*` |
### Search Ranking
Final search score combines:
1. **Vector similarity** (cosine distance)
2. **IDF weight** (rare tags boost more)
3. **Tag classification** (high > medium > low > filter)
4. **Variant bonus** (tasks with tag_variants get small boost)
## 🔍 How Semantic Search Works
The server uses **sentence-transformers** to convert tasks into 384-dimensional vectors that capture semantic meaning:
### Example Searches
| Query | Finds Tasks About |
|-------|---------------------|
| "authentication" | Login, JWT, OAuth, user verification |
| "database optimization" | SQL queries, indexing, performance |
| "frontend components" | React, UI elements, styling |
| "API integration" | REST endpoints, webhooks, external services |
### Hierarchical Tasks
Create parent-child relationships:
```
# Create parent task
task_create(title="User Management", content="Complete user system")
# Returns: task_id = 100
# Create subtasks
task_create(title="User Registration", content="...", parent_id=100)
task_create(title="Email Verification", content="...", parent_id=100)
task_create(title="Password Reset", content="...", parent_id=100)
```
## 📊 Task Statistics
The `task_stats` tool provides comprehensive insights:
```json
{
"total_tasks": 247,
"by_status": {
"pending": 120,
"in_progress": 8,
"completed": 80,
"tested": 20,
"validated": 10,
"stopped": 9
},
"pending_count": 120,
"in_progress_count": 8,
"completed_count": 80,
"tested_count": 20,
"validated_count": 10,
"stopped_count": 9,
"with_subtasks": 15,
"next_task_id": 45
}
```
### Statistics Fields Explained
- **total_tasks**: Total number of tasks in database
- **by_status**: Task count breakdown by status (pending, in_progress, completed, tested, validated, stopped)
- **pending_count**: Tasks not yet started
- **in_progress_count**: Tasks currently being worked on
- **completed_count**: Tasks finished (basic completion)
- **tested_count**: Tasks that have been tested
- **validated_count**: Tasks that have been validated
- **stopped_count**: Tasks that were stopped (can be resumed)
- **with_subtasks**: Number of parent tasks with subtasks
- **next_task_id**: ID of the next task to work on (smart selection)
## 🛡️ Security Features
### Input Validation
- Sanitizes all user input to prevent injection attacks
- Removes control characters and null bytes
- Enforces length limits on all content
### Path Security
- Validates and normalizes all file paths
- Prevents directory traversal attacks
- Blocks suspicious character patterns
### Resource Limits
- Limits bulk operations and individual task size
- Prevents database bloat
- Implements safe transaction handling
### SQL Safety
- Uses parameterized queries exclusively
- No dynamic SQL construction from user input
- SQLite WAL mode for safe concurrent access
## 🔧 Troubleshooting
### Common Issues
#### Server Not Starting
```bash
# Check if uv is installed
uv --version
# Test server manually
uv run main.py --working-dir ./test
# Check Python version
python --version # Should be 3.10+
```
#### Claude Desktop Not Connecting
1. Verify absolute paths in configuration
2. Check Claude Desktop logs: `~/Library/Logs/Claude/`
3. Restart Claude Desktop after config changes
4. Test server manually before configuring Claude
#### Task Search Not Working
- Verify sentence-transformers model downloaded successfully
- Check database file permissions
- Try broader search terms
- Review task content for relevance
### Debug Mode
Run the server manually to see detailed logs:
```bash
uv run main.py --working-dir ./debug-test
```
## 🚀 Advanced Usage
### Task Organization Strategies
#### By Project Phase
Use tags to organize by development phase:
- `["phase-1", "mvp", "core-features"]`
- `["phase-2", "optimization", "performance"]`
- `["phase-3", "polish", "ux-improvements"]`
#### By Technology Stack
- `["frontend", "react", "typescript"]`
- `["backend", "python", "fastapi"]`
- `["devops", "docker", "kubernetes"]`
#### By Feature Domain
- `["authentication", "security", "jwt"]`
- `["payments", "stripe", "billing"]`
- `["analytics", "reporting", "dashboard"]`
### Integration with Development Workflow
#### Agile Sprint Planning
```
Create sprint backlog tasks with priorities
Track progress with task_start/task_finish
Use task_stats for sprint reports
```
#### Bug Tracking
```
Create bug tasks with "critical" priority
Add tags: ["bug", "production", "hotfix"]
Use comments for debugging notes
```
#### Feature Development
```
Create parent task for feature
Add subtasks for implementation steps
Track each subtask through lifecycle
```
## 📈 Performance Benchmarks
Based on testing with various dataset sizes:
| Task Count | Search Time | Storage Size | RAM Usage |
|------------|-------------|--------------|-----------|
| 1,000 | <50ms | ~5MB | ~100MB |
| 5,000 | <100ms | ~20MB | ~200MB |
| 10,000 | <200ms | ~40MB | ~300MB |
*Tested on MacBook Air M1 with sentence-transformers/all-MiniLM-L6-v2*
## 🧪 Test Coverage
```
tests/
├── test_task_store.py # 60 tests - Task store operations
└── test_normalization.py # 45 tests - Tag normalization
Total: 105 tests
```
Run tests:
```bash
uv run pytest tests/ -v
```
## 🔄 Backward Compatibility
New features are backward compatible:
| Feature | Migration |
|---------|-----------|
| `tag_variants` column | Auto-added via ALTER TABLE |
| `canonical_tags` table | Auto-created via CREATE TABLE IF NOT EXISTS |
| IDF reranking | Opt-in via `use_idf_rerank=True` |
Existing databases work without changes. New columns/tables added automatically on first run.
## 🤝 Contributing
This is a standalone MCP server designed for personal/team use. For improvements:
1. **Fork** the repository
2. **Modify** as needed for your use case
3. **Test** thoroughly with your specific requirements
4. **Share** improvements via pull requests
## 📄 License
This project is released under the MIT License.
## 🙏 Acknowledgments
- **sqlite-vec**: Alex Garcia's excellent SQLite vector extension
- **sentence-transformers**: Nils Reimers' semantic embedding library
- **FastMCP**: Anthropic's high-level MCP framework
- **Claude Desktop**: For providing the MCP integration platform
---
**Built for developers who want intelligent task management with semantic search capabilities.**
| text/markdown | null | Xsaven <xsaven@gmail.com> | null | null | null | mcp, model-context-protocol, task-management, sqlite, embeddings, semantic-search, claude, ai-tasks | [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Scientific/Engineering :: Artificial Intelligence"
] | [] | null | null | >=3.10 | [] | [] | [] | [
"mcp>=0.3.0",
"sqlite-vec>=0.1.6",
"sentence-transformers>=2.2.2"
] | [] | [] | [] | [
"Homepage, https://github.com/xsaven/vector-task-mcp",
"Repository, https://github.com/xsaven/vector-task-mcp",
"Issues, https://github.com/xsaven/vector-task-mcp/issues"
] | uv/0.8.12 | 2026-02-20T19:05:47.028558 | vector_task_mcp-1.7.3.tar.gz | 126,973 | 03/88/fecbbb1d18696dfb9f3158ccd6e2fec5cf5fe0735b56a63efbef9f8925d6/vector_task_mcp-1.7.3.tar.gz | source | sdist | null | false | a715cdea74196944a4dc82855e48fedd | 30e97fd5495680eb02880309b1419101d1033988e68b118662a02e19325475e3 | 0388fecbbb1d18696dfb9f3158ccd6e2fec5cf5fe0735b56a63efbef9f8925d6 | MIT | [
"LICENSE"
] | 207 |
2.4 | stix-shifter-modules-ibm-security-verify | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:05:45.901695 | stix_shifter_modules_ibm_security_verify-8.1.0-py3-none-any.whl | 37,325 | 15/54/95ba392284c10725080f31bf7611da2e7037bb6ecf884f389a7e2898ff66/stix_shifter_modules_ibm_security_verify-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | 3bba0fd5736081a0be3520d6993071ef | 1a2a43a18bd56522ac3b53f6c06f31c12938084f59faeef8afb44b2f709628d9 | 155495ba392284c10725080f31bf7611da2e7037bb6ecf884f389a7e2898ff66 | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 84 |
2.4 | stix-shifter-modules-guardium | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:05:44.852304 | stix_shifter_modules_guardium-8.1.0-py3-none-any.whl | 49,561 | 6e/47/c3d11e415ce28f29184ed2b160aebf5c7c863989ab2f3691637b7cb3cce1/stix_shifter_modules_guardium-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | d2b3de8c24542ffb1ad959805735ac22 | 7870d5c5b1748eaa6efa39af74007505dd523e13a6de92b16c47552a2c7454b8 | 6e47c3d11e415ce28f29184ed2b160aebf5c7c863989ab2f3691637b7cb3cce1 | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 87 |
2.4 | stix-shifter-modules-gcp-chronicle | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [
"aiogoogle==5.1.0"
] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:05:43.831761 | stix_shifter_modules_gcp_chronicle-8.1.0-py3-none-any.whl | 69,579 | 84/4a/377ca1577b98e96f6b0e46ec1d7a91e7e172a4094ba104cec270fd909de0/stix_shifter_modules_gcp_chronicle-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | 2bd12e9d434cb4e7b604b9ae90c56bc5 | 1327fe584000fd238b7a3ec4a71978968c5a43a75a7f1aeea18759c71146fcdc | 844a377ca1577b98e96f6b0e46ec1d7a91e7e172a4094ba104cec270fd909de0 | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 81 |
2.4 | stix-shifter-modules-error-test | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:05:42.536654 | stix_shifter_modules_error_test-8.1.0-py3-none-any.whl | 24,875 | 74/cf/17a465c3d6c3cd047201f35979dc3bb2547632f0d04d1331e8e3e31fa3e4/stix_shifter_modules_error_test-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | 7e4671a156b594c973488f3138f3f2c4 | a5b56984936067352318ccfc8e092c1f1ab8914514029e133e5d433c89772a1b | 74cf17a465c3d6c3cd047201f35979dc3bb2547632f0d04d1331e8e3e31fa3e4 | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 86 |
2.4 | stix-shifter-modules-elastic-ecs | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:05:41.252597 | stix_shifter_modules_elastic_ecs-8.1.0-py3-none-any.whl | 74,519 | e4/c8/47571b4fc843260f1a87f446669a690a7b045179f670e40ea874bed5bf1b/stix_shifter_modules_elastic_ecs-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | c1ede60e46dbdb0042ef57993fc1058a | d2ebf733c5981522b6695cd65a5cd04f14d60ce23a85b72c2b6cfff761afa508 | e4c847571b4fc843260f1a87f446669a690a7b045179f670e40ea874bed5bf1b | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 85 |
2.4 | stix-shifter-modules-demo-template | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [
"mysql-connector-python==9.1.0"
] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:05:40.200122 | stix_shifter_modules_demo_template-8.1.0-py3-none-any.whl | 31,321 | 42/ad/a745ec6eba0ae8e556d7e7fdafeaa9323bc65a1b84e8273d21b6cbd58f2e/stix_shifter_modules_demo_template-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | 81c5fd755c67809a1df3508a02603d39 | 7127d174ffd1fa0e53938429cf480da8df5ab7f7710926780cc3c24c30281804 | 42ada745ec6eba0ae8e556d7e7fdafeaa9323bc65a1b84e8273d21b6cbd58f2e | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 81 |
2.4 | stix-shifter-modules-datadog | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [
"datadog_api_client[async]<3.0.0,>=2.40.0"
] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:05:38.779179 | stix_shifter_modules_datadog-8.1.0-py3-none-any.whl | 31,815 | b5/a7/8ed6ae645aef3fef41a18e8f94ae3563ee09ecb208e38f186b2c10911873/stix_shifter_modules_datadog-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | 6cffda7eb5a8f773304e212213aeff32 | 49c0ca9ae488b633500ace9fece1baf97b3c0a129510dd21f09932a75dc7da4f | b5a78ed6ae645aef3fef41a18e8f94ae3563ee09ecb208e38f186b2c10911873 | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 82 |
2.4 | stix-shifter-modules-darktrace | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [
"pyparsing==3.0.9"
] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:05:37.796446 | stix_shifter_modules_darktrace-8.1.0-py3-none-any.whl | 56,570 | 29/dd/020cdcb61cbf30008ec5acf1b90cc1af4d4c40c4a0d8b326ccd8068098f4/stix_shifter_modules_darktrace-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | e535da5e6f271034716b7e32cba80a5b | 1e0dd8100fb665bfc1fc7bb4fb7ee0b6d2091247435ee56709e435cfcfdbd54d | 29dd020cdcb61cbf30008ec5acf1b90cc1af4d4c40c4a0d8b326ccd8068098f4 | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 84 |
2.4 | stix-shifter-modules-cybereason | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:05:36.599376 | stix_shifter_modules_cybereason-8.1.0-py3-none-any.whl | 62,603 | f9/76/3862fe3bd0987f0f27a8e6bb80ae1697cd8335d833a9c8c0775d1ecefb6f/stix_shifter_modules_cybereason-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | f990c79982ec862cd15e34c950673034 | 12b1a05779c085b2f14bec307dfe34fe7214b47c43ad9e260fe92278b8073022 | f9763862fe3bd0987f0f27a8e6bb80ae1697cd8335d833a9c8c0775d1ecefb6f | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 87 |
2.4 | stix-shifter-modules-crowdstrike-logscale | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:05:35.556989 | stix_shifter_modules_crowdstrike_logscale-8.1.0-py3-none-any.whl | 49,041 | 02/c6/c6a94432bb41d901a3e4153a15370c7c4d0c458141dd9dca56572e59fcf1/stix_shifter_modules_crowdstrike_logscale-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | 5ed8189ba6a6c2e041b83376999a8793 | 19348a31def9ab622de26b5ea77658811aa8344be79960213f67424cf0a92951 | 02c6c6a94432bb41d901a3e4153a15370c7c4d0c458141dd9dca56572e59fcf1 | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 83 |
2.4 | stix-shifter-modules-crowdstrike-alerts | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:05:34.652614 | stix_shifter_modules_crowdstrike_alerts-8.1.0-py3-none-any.whl | 48,493 | f1/09/f6c7573a3a695433be1eb6c3daa2b5f45db055523058cf2f258d1bc7eeb4/stix_shifter_modules_crowdstrike_alerts-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | 036208b4250addaf9ad60243492b3447 | 286577f12a03fc5150cb25bbeaee3a62eba40072381d1b937a2e375a14de6855 | f109f6c7573a3a695433be1eb6c3daa2b5f45db055523058cf2f258d1bc7eeb4 | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 84 |
2.4 | stix-shifter-modules-crowdstrike | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:05:33.536338 | stix_shifter_modules_crowdstrike-8.1.0-py3-none-any.whl | 36,755 | 78/da/5ab69fa1edb0de9ca9376ded45cc13207d952909fa027eb54bb5392f86b3/stix_shifter_modules_crowdstrike-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | f1c43797183301523bab246f67ed4906 | b0a2002826a7eaab0b0a292c5b093d3ea069260529c0e3ebf8323292f2318359 | 78da5ab69fa1edb0de9ca9376ded45cc13207d952909fa027eb54bb5392f86b3 | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 90 |
2.4 | stix-shifter-modules-cisco-secure-email | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:05:32.675822 | stix_shifter_modules_cisco_secure_email-8.1.0-py3-none-any.whl | 39,519 | 10/7b/3e2175f3fb5ddd081026945f372b8a08f42af5df941d6e75baac4f23a852/stix_shifter_modules_cisco_secure_email-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | 5ba6bdc9a780d6d539cd7e75fc22250d | 891865a543962896396f77af5384a07d993cdf715089afbd1ebb7c9b47fc6b55 | 107b3e2175f3fb5ddd081026945f372b8a08f42af5df941d6e75baac4f23a852 | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 84 |
2.4 | stix-shifter-modules-cbcloud | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:05:31.476396 | stix_shifter_modules_cbcloud-8.1.0-py3-none-any.whl | 37,170 | 27/23/a8fbe66f9145d08c76e62bac629b36f4e1723c5e493672c38686fb5efd1e/stix_shifter_modules_cbcloud-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | a3a3f729bcb8a2e0f01c50cb91790c11 | 703e5e7fc55db28920a2b61a625d6c2ec301c1d949ec8f7f5c024182084d1aee | 2723a8fbe66f9145d08c76e62bac629b36f4e1723c5e493672c38686fb5efd1e | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 88 |
2.4 | stix-shifter-modules-carbonblack | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:05:30.524595 | stix_shifter_modules_carbonblack-8.1.0-py3-none-any.whl | 40,862 | 7d/9b/565021757a828a6d489b0dabeda8d06fe7f1e8410a53b7e4232905977fdf/stix_shifter_modules_carbonblack-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | 43b501d807bb8fe23e1052245e319d6a | 700a06054f760cb0c2234e72d68ecf62be8410dae9c8e472d19b556631e7963c | 7d9b565021757a828a6d489b0dabeda8d06fe7f1e8410a53b7e4232905977fdf | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 87 |
2.4 | stix-shifter-modules-bigfix | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:05:29.067522 | stix_shifter_modules_bigfix-8.1.0-py3-none-any.whl | 42,874 | 1b/7c/866c427e91d1edbb9b57c5f3403148f3463293effe4a6b563a8409c720af/stix_shifter_modules_bigfix-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | 09be7760628991d35924fb685cca697b | 1fb95ddf6b73ab5aa3d2b5ad185c7eed8bfe6be14a12e59d29a2681e58426a82 | 1b7c866c427e91d1edbb9b57c5f3403148f3463293effe4a6b563a8409c720af | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 93 |
2.4 | stix-shifter-modules-azure-sentinel | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:05:27.824205 | stix_shifter_modules_azure_sentinel-8.1.0-py3-none-any.whl | 50,191 | f2/0c/119906c8312440c1488da04652fa411c3b5ed95778511534d860e82d57e0/stix_shifter_modules_azure_sentinel-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | 4860c1d8b977bcd3eaf570f270bba019 | de7864781ec2a8f65cb3f862d4c38105fac3cd9f212703df9ece9b5e826daebe | f20c119906c8312440c1488da04652fa411c3b5ed95778511534d860e82d57e0 | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 86 |
2.4 | stix-shifter-modules-azure-log-analytics | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [
"azure-monitor-query==1.0.2",
"jsonref==1.1.0",
"numpy<3.0.0,>=2.1.0",
"pandas==2.2.2"
] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:05:26.642362 | stix_shifter_modules_azure_log_analytics-8.1.0-py3-none-any.whl | 58,473 | 43/17/0afe1ae3cb9eade00ed56f6ef643741a02aa4f210d5ba665361f73597fd6/stix_shifter_modules_azure_log_analytics-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | 60edef03ab18ad2b5cd408037dde2760 | 86c61336e484bc2e535bc8096d88527cd41ec7d735f2c39b6d3a0dbb5f81c8cc | 43170afe1ae3cb9eade00ed56f6ef643741a02aa4f210d5ba665361f73597fd6 | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 82 |
2.4 | stix-shifter-modules-aws-guardduty | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:05:25.449856 | stix_shifter_modules_aws_guardduty-8.1.0-py3-none-any.whl | 63,316 | 4b/51/40bb7dce7b16263421c825213a99d9d632b17f515b7ce5f23520d22a6a44/stix_shifter_modules_aws_guardduty-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | 7375d6b92e528415d67f4b135965f201 | 8728eea20a9a2e1398cfb821f59c9752a1cc4fba10784606160dc858448c6f20 | 4b5140bb7dce7b16263421c825213a99d9d632b17f515b7ce5f23520d22a6a44 | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 85 |
2.4 | stix-shifter-modules-aws-cloud-watch-logs | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:05:24.176939 | stix_shifter_modules_aws_cloud_watch_logs-8.1.0-py3-none-any.whl | 45,094 | c8/11/54fab9e06dec9090891ebf18634cd93cbb1a7532628114ccd9c6cdfeb99e/stix_shifter_modules_aws_cloud_watch_logs-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | bbb7b584ce3dd951b3a7669ce97e75e1 | 6da584bc5e8e9d935035e7a7ff31052c073f95bcf86d31ac86082edb1b93bdc6 | c81154fab9e06dec9090891ebf18634cd93cbb1a7532628114ccd9c6cdfeb99e | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 93 |
2.4 | stix-shifter-modules-aws-athena | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:05:23.104375 | stix_shifter_modules_aws_athena-8.1.0-py3-none-any.whl | 85,486 | 20/3f/55eb9986422a8a806790ab8416f564fe9f4aa363e2e52e1b7e67af822bea/stix_shifter_modules_aws_athena-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | a71a4c22221ae0b6142459e68bca2c5b | 017fc47ed6711f7d49610032b4a524bff67fb6e2f93c2d4f55d72da9127fba40 | 203f55eb9986422a8a806790ab8416f564fe9f4aa363e2e52e1b7e67af822bea | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 95 |
2.4 | stix-shifter-modules-async-template | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:05:22.145349 | stix_shifter_modules_async_template-8.1.0-py3-none-any.whl | 35,600 | e2/99/bfa038335e72dc90d414d4657fc24a1815a771e3e2bd3bed86b6945e48db/stix_shifter_modules_async_template-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | aa8ea5beed32ff09c1f0ef9b517407cf | 36c5649e206231cfb9c7627d9d39253ab4aed94143bc92172874180b43956795 | e299bfa038335e72dc90d414d4657fc24a1815a771e3e2bd3bed86b6945e48db | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 88 |
2.4 | stix-shifter-modules-arcsight | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:05:21.081943 | stix_shifter_modules_arcsight-8.1.0-py3-none-any.whl | 46,544 | 4d/06/f5a8487892b00db5b20936ec4096ceb9c021b309a98aedde566678057c88/stix_shifter_modules_arcsight-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | f42c376d2f368ee343d2eb65871bda82 | f5f1ded137e46280a505ad3372770d8f6361530d0c7c622e4d6cd745a6f8d1f9 | 4d06f5a8487892b00db5b20936ec4096ceb9c021b309a98aedde566678057c88 | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 95 |
2.4 | stix-shifter-modules-alertflex | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:05:20.164524 | stix_shifter_modules_alertflex-8.1.0-py3-none-any.whl | 32,734 | a8/7e/599e1e2a9f7f52813398838b17d5933ec78622363ef11238722527eedcf3/stix_shifter_modules_alertflex-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | 0a8418a4b912c87d9b46f4f8f4087bec | fa0da7fafc9cd52a54fdc626ca7b2f25adaae6adb78bbaf640fc546c55495f10 | a87e599e1e2a9f7f52813398838b17d5933ec78622363ef11238722527eedcf3 | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 87 |
2.4 | stix-shifter | 8.1.0 | Tools and interface to translate STIX formatted results and queries to different data source formats and to set up appropriate connection strings for invoking and triggering actions in openwhisk | [](https://github.com/opencybersecurityalliance/stix-shifter/actions)
[](https://codecov.io/gh/opencybersecurityalliance/stix-shifter)
# Introduction
STIX-shifter is an open source python library allowing software to connect to products that house data repositories by using STIX Patterning, and return results as STIX Observations.
This library takes in STIX 2 Patterns as input, and "finds" data that matches the patterns inside various products that house repositories of cybersecurity data. Examples of such products include SIEM systems, endpoint management systems, threat intelligence platforms, orchestration platforms, network control points, data lakes, and more.
In addition to "finding" the data by using these patterns, STIX-Shifter also _transforms the output_ into STIX 2 Observations. Why would we do that you ask? To put it simply - so that all of the security data, regardless of the source, mostly looks and behaves the same.
***Project Documentation***
For general information about STIX, this project, and the command line utilities, see the [STIX-shifter Documentation](https://stix-shifter.readthedocs.io/)
## Installation
The recommended method for installing stix-shifter is via pip. Two prerequisite packages needs to be installed inlcuding the package of stix-shifter connector module to complete a stix-shifter connector installation. Run the below commands to install all the packages:
1. Main stix-shifter package: `pip install stix-shifter`
2. Stix-shifter Utility package: `pip install stix-shifter-utils`
3. Desired stix-shifter connector module package: `pip install stix-shifter-modules-<module name> `
Example: `pip install stix-shifter-modules-qradar`
### Dependencies
STIX-shifter requries Python 3.10 or greater. See the [requirements file](../stix_shifter/requirements.txt) for library dependencies.
## Usage
STIX-Shifter can use used the following ways:
### As a command line utility
The STIX-Shifter comes with a bundled script which you can use to translate STIX Pattern to a native datasource query. It can also be used to translate a JSON data source query result to a STIX bundle of observable objects. You can also send query to a datasource by using a transmission option.
More details of the command line option can be found [here](OVERVIEW.md#how-to-use)
```
$ stix-shifter translate <MODULE NAME> query "<STIX IDENTITY OBJECT>" "<STIX PATTERN>" "<OPTIONS>"
```
Example:
```
$ stix-shifter translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to build `stix-shifter` packages from source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup: `python -m build_tools.run_build install`
### Running from the source
You may also use the `python3 main.py` script. All the options are the same as the command line utility described above.
Example:
```
python3 main.py translate qradar query {} "[ipv4-addr:value = '127.0.0.1']" {}
```
In order to run `python3 main.py` from the source follow the below prerequisite steps:
1. Go to the stix-shifter parent directory
2. Optionally, you can create a Python 3 virtual environemnt:
`virtualenv -p python3 virtualenv && source virtualenv/bin/activate`
3. Run setup to install dependancies: `INSTALL_REQUIREMENTS_ONLY=1 python3 -m build_tools.run_build install`.
**Note:** `build_tools.run_build` only installs dependencies when INSTALL_REQUIREMENTS_ONLY=1 directive is used. This option is similar to `python3 -m build_tools.pre_build && pip install -r requirements.txt`
### As a library
You can also use this library to integrate STIX Shifter into your own tools. You can translate a STIX Pattern:
```
from stix_shifter.stix_translation import stix_translation
translation = stix_translation.StixTranslation()
response = translation.translate('<MODULE NAME>', 'query', '{}', '<STIX PATTERN>', '<OPTIONS>')
print(response)
```
### Use of custom mappings
If a connector has been installed using pip, the process for editing the STIX mappings is different than if you have pulled-down the project. When working locally, you can edit the mapping files directly. See the [mapping files for the MySQL connector](https://github.com/opencybersecurityalliance/stix-shifter/tree/develop/stix_shifter_modules/mysql/stix_translation/json) as an example. Editing the mapping files won't work if the connector has been installed with pip; the setup script of the stix-shifter package includes the mapppings inside `config.json`. This allows stix-shifter to injest custom mappings as part of the connector's configuration.
Refer to [Use of custom mappings](adapter-guide/custom_mappings.md) for more details on how to edit the mappings in the configuration.
# Contributing
We are thrilled you are considering contributing! We welcome all contributors.
Please read our [guidelines for contributing](CONTRIBUTING.md).
## [Connector Developer Guide](adapter-guide/develop-stix-adapter.md)
## [CLI tools and Connector Development Labs](lab/README.md)
# Licensing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# More Resources
## Join us on Slack!
[Click here](https://docs.google.com/forms/d/1vEAqg9SKBF3UMtmbJJ9qqLarrXN5zeVG3_obedA3DKs) and fill out the form to receive an invite to the Open Cybersecurity Alliance slack instance, then join the #stix-shifter channel, to meet and discuss usage with the team.
## Introduction Webinar!
[Click here](https://ibm.biz/BdzTyA) to view an introduction webinar on STIX Shifter and the use cases it solves for.
## Changelog
- [Changelog](../CHANGELOG.md)
| text/markdown | ibm | null | null | null | null | datasource, stix, translate, transform, transmit | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | null | null | >=3.10 | [] | [] | [] | [
"aioboto3<16.0.0,>=15.2.0",
"aiohttp-retry==2.8.3",
"aiomysql<0.4.0,>=0.3.2",
"antlr4-python3-runtime==4.13.2",
"asyncio==3.4.3",
"asynctest==0.13.0",
"attrs==24.2.0",
"azure-identity==1.19.0",
"colorlog==6.8.2",
"flask==3.1.3",
"flatten_json==0.1.14",
"json-fix==1.0.0",
"jsonmerge==1.9.2",
"pyOpenSSL==25.3.0",
"python-dateutil<3.0.0,>=2.9.0",
"regex==2023.12.25",
"stix2-matcher==3.0.0",
"stix2-patterns==2.1.2",
"urllib3<3.0.0,>=2.6.3",
"xmltodict==0.13.0"
] | [] | [] | [] | [
"Homepage, https://github.com/opencybersecurityalliance/stix-shifter",
"Source, https://github.com/opencybersecurityalliance/stix-shifter"
] | twine/6.2.0 CPython/3.11.13 | 2026-02-20T19:05:18.575534 | stix_shifter-8.1.0-py3-none-any.whl | 29,906 | dd/7e/f16073b43c5d5ffb4c05c43c230d9808ad26e39436918eadbaf71f0f21a3/stix_shifter-8.1.0-py3-none-any.whl | py3 | bdist_wheel | null | false | d4d6c26556f1ca145cbf1bce943e7169 | dd44d3ec0b69a49464480c17b31038076a72c75186a4564a4f948fe363fd65a2 | dd7ef16073b43c5d5ffb4c05c43c230d9808ad26e39436918eadbaf71f0f21a3 | Apache-2.0 | [
"LICENSE.md",
"AUTHORS.md",
"NOTICE"
] | 104 |
2.4 | apyt | 0.1.0.dev3 | APyT is a Python package which provides modules for the evaluation of atom probe tomography (APT) data. | # APyT: A modular open-source Python framework for atom probe tomography data evaluation
The APyT package is an advanced, open-source Python framework for evaluating
atom probe tomography (APT) data. It offers a suite of modules that automate key
steps in APT processing, from mass spectrum calibration to three-dimensional
sample reconstruction. Its modular architecture ensures seamless integration
with external tools through standardized input/output interfaces, supporting
both Linux and Windows environments. Users can import and use each module
independently, or integrate them in custom workflows or GUI applications.
For ready-to-use scenarios or testing, a command line interface (CLI) is
provided. The CLI offers lightweight wrappers around the core modules, enabling
users to process raw measurement data without writing additional Python code. It
is particularly useful for exploratory analysis, quick prototyping, and
stand-alone usage.
Key features include high efficiency with [NumPy][numpy] and [Numba][numba], a
low memory footprint, and extensive documentation. The modules are highly
automated, requiring minimal user input to achieve accurate results. The package
also integrates SQL or local database management for raw measurement data and
corresponding metadata.
# User Guide
For detailed installation instructions, configuration options, and usage
examples, please refer to the official APyT documentation available through the
homepage (see project links in the navigation section on this page).
# License Notice – Use in Modifications and Derivative Works
This software is licensed under the
[GNU Affero General Public License v3.0 (AGPLv3)][agpl].
Under the AGPLv3, any software that incorporates, imports, links to, or depends
on this project to perform essential functionality may be considered a
derivative work. In such cases:
- The complete source code of the resulting software must be made available
under the AGPLv3 (or a compatible license).
- This requirement applies not only to traditional distribution but also when
the software is made available as a network service (e.g., SaaS or web
applications).
## Personal/Academic Use
You are free to use, study, and modify this software for personal purposes
without any obligation to publish your changes, provided the software is not
distributed or made accessible to others (including over a network).
This includes, but is not limited to:
- Personal research and experimentation
- Academic or offline analysis
- Internal use within a lab or private project
- Non-public prototypes or development tools
**Important:** If you share this software or make it accessible to others—such
as through collaborative work, academic publications, network-based services, or
cloud deployments—you must comply with the AGPLv3 by releasing the complete
corresponding source code.
If you're unsure whether your use qualifies as personal or requires source
disclosure, feel free to contact the project maintainer for clarification.
[numpy]: https://numpy.org/
[numba]: https://numba.pydata.org/
[agpl]: https://www.gnu.org/licenses/agpl-3.0.html
| text/markdown | null | "Sebastian M. Eich" <Sebastian.Eich@imw.uni-stuttgart.de> | null | null | null | null | [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering"
] | [] | null | null | >=3.11 | [] | [] | [] | [
"findiff",
"fujson",
"html2text",
"lmfit",
"matplotlib",
"numba>=0.57",
"numpy",
"packaging",
"periodictable",
"platformdirs",
"psutil",
"pyperclip",
"pyvista",
"pyyaml",
"requests",
"scipy>=1.11",
"ttkthemes"
] | [] | [] | [] | [
"Homepage, https://apyt.mp.imw.uni-stuttgart.de/",
"Documentation, https://apyt.mp.imw.uni-stuttgart.de/",
"Changelog, https://apyt.mp.imw.uni-stuttgart.de/release.html",
"Repository, https://github.com/sebi-85/apyt",
"Issues, https://github.com/sebi-85/apyt/issues"
] | twine/6.1.0 CPython/3.12.3 | 2026-02-20T19:05:09.926488 | apyt-0.1.0.dev3.tar.gz | 5,844,322 | 96/45/ce65d5bac65fd56f5f956599d8830c4dc60b6c22e5055614438a64383e37/apyt-0.1.0.dev3.tar.gz | source | sdist | null | false | d08081ad86cb5938b945bf9ad34969b0 | 40f54491feeeab2c8e41251dcd24181251e729e7d05e196043f96195297d2a6f | 9645ce65d5bac65fd56f5f956599d8830c4dc60b6c22e5055614438a64383e37 | AGPL-3.0-or-later | [
"LICENSE"
] | 161 |
2.4 | vkworkspace | 1.8.4 | Fully async framework for building VK Teams (VK Workspace) bots, inspired by aiogram 3 | # vkworkspace
**Fully asynchronous** framework for building bots on **VK Teams** (VK Workspace / VK SuperApp), inspired by [aiogram 3](https://github.com/aiogram/aiogram).
A modern replacement for the official [mail-ru-im/bot-python](https://github.com/mail-ru-im/bot-python) (`mailru-im-bot`) library.
[](https://www.python.org/downloads/)
[](https://github.com/TimmekHW/vkworkspace/blob/main/LICENSE)
[](https://pypi.org/project/vkworkspace/)
[](https://pypi.org/project/vkworkspace/)
[](https://pepy.tech/projects/vkworkspace)
> **[README на русском языке](https://github.com/TimmekHW/vkworkspace/blob/main/README_RU.md)**
> **🤖 LLM-Assisted Development:** Feed [`llm_full.md`](https://github.com/TimmekHW/vkworkspace/blob/main/llm_full.md) to any LLM (ChatGPT, Claude, Gemini, etc.) and it will know the entire framework API — write handlers, keyboards, FSM dialogs, middleware, and more without reading the docs.
## Table of Contents
- [vkworkspace vs mailru-im-bot](#vkworkspace-vs-mailru-im-bot)
- [Why async?](#why-async)
- [Features](#features)
- [Installation](#installation)
- [Quick Start](#quick-start)
- [Bot Configuration](#bot-configuration)
- [Dispatcher](#dispatcher)
- [Router & Event Types](#router--event-types)
- [Filters](#filters)
- [Text Formatting](#text-formatting)
- [Inline Keyboards](#inline-keyboards)
- [FSM (Finite State Machine)](#fsm-finite-state-machine)
- [Custom Middleware](#custom-middleware)
- [Message Methods](#message-methods)
- [Bot API Methods](#bot-api-methods)
- [Handler Dependency Injection](#handler-dependency-injection)
- [Mini-Apps + Bots](#mini-apps--bots)
- [Testing](#testing)
- [Examples](#examples)
- [Project Structure](#project-structure)
- [Requirements](#requirements)
- [License](#license)
## vkworkspace vs mailru-im-bot
The official [mailru-im-bot](https://github.com/mail-ru-im/bot-python) library is synchronous, based on `requests`, and has not been updated in years. **vkworkspace** is a ground-up async rewrite with a modern developer experience.
### Feature Comparison
| | mailru-im-bot | vkworkspace |
|---|:---:|:---:|
| **HTTP client** | `requests` (sync) | `httpx` (async) |
| **Models** | raw `dict` | Pydantic v2 |
| **Router / Dispatcher** | — | aiogram-style |
| **Magic filters (`F`)** | — | `F.text`, `F.chat.type == "private"` |
| **FSM (state machine)** | — | Memory + Redis backends |
| **Middleware pipeline** | — | inner/outer, per-event type |
| **Inline keyboard builder** | — | `InlineKeyboardBuilder` |
| **Rate limiter** | — | built-in token-bucket |
| **Retry on 5xx** | — | exponential backoff |
| **SSL control** | — | `verify_ssl=False` |
| **Proxy support** | — | `proxy=` parameter |
| **Handler DI** | — | auto-inject `bot`, `state`, `command` |
| **Custom command prefixes** | — | `prefix=("/", "!", "")` |
| **Error handlers** | — | `@router.error()` |
| **Type hints** | partial | full |
### Speed Benchmarks
Tested on Python 3.11, VK Teams corporate instance. 5 rounds per discipline, median values:
```
mailru-im-bot vkworkspace winner
(requests sync) (httpx async)
Bot Info (self/get) 34 ms 33 ms ~tie
Send Text 82 ms 109 ms mailru-im-bot
Send Keyboard 97 ms 90 ms vkworkspace
Edit Message 57 ms 44 ms vkworkspace
Delete Message 33 ms 38 ms mailru-im-bot
Chat Info 43 ms 42 ms ~tie
Send Actions 30 ms 28 ms vkworkspace
BURST (10 msgs) 1110 ms 335 ms vkworkspace (3.3x!)
───────────────────────────────────────────
Score 2 4 vkworkspace wins
```
**Key takeaway:** For single sequential requests, both libraries are within network noise (~1 ms difference). But when you need to send multiple messages or handle concurrent users, async wins decisively — **3.3x faster** on burst operations via `asyncio.gather()`.
The framework overhead is **zero** in real conditions. Network latency dominates 99%+ of total time.
## Why async?
VK Teams bots spend 99% of their time waiting for the network. Synchronous frameworks (`requests`) block the entire process on every API call. **vkworkspace** uses `httpx.AsyncClient` and `asyncio` — while one request waits for a response, the bot handles other messages.
## Features
- **100% async** — `httpx` + `asyncio`, zero blocking calls, real concurrency
- **Aiogram-like API** — `Router`, `Dispatcher`, `F` magic filters, middleware, FSM
- **Type-safe** — Pydantic v2 models for all API types, full type hints
- **Flexible filtering** — `Command`, `StateFilter`, `ChatTypeFilter`, `CallbackData`, `ReplyFilter`, `ForwardFilter`, regex, magic filters
- **Custom command prefixes** — `Command("start", prefix=("/", "!", ""))` for any prefix style
- **FSM** — Finite State Machine with Memory and Redis storage backends
- **Middleware** — inner/outer middleware pipeline for logging, auth, throttling
- **Text formatting** — `md`, `html` helpers for MarkdownV2/HTML + `FormatBuilder` for offset/length + `split_text` for long messages
- **Keyboard builder** — fluent API for inline keyboards with button styles
- **Rate limiter** — built-in request throttling (`rate_limit=5` = max 5 req/sec)
- **Retry on 5xx** — automatic retry with exponential backoff on server errors
- **SSL control** — disable SSL verification for on-premise with self-signed certs
- **FSM session timeout** — auto-clear abandoned FSM forms after configurable inactivity
- **Proxy support** — route API requests through corporate proxy
- **Edited message routing** — `handle_edited_as_message=True` to process edits as new messages
- **Lifecycle hooks** — `on_startup` / `on_shutdown` for init/cleanup logic
- **Error handlers** — `@router.error()` to catch exceptions from any handler
- **Multi-bot polling** — `dp.start_polling(bot1, bot2)` to poll multiple bots
- **9 event types** — message, edited, deleted, pinned, unpinned, members join/leave, chat info, callbacks
- **Python 3.11 — 3.14** support (free-threaded / no-GIL build not yet tested)
## Installation
```bash
pip install vkworkspace
```
With Redis FSM storage:
```bash
pip install vkworkspace[redis]
```
## Quick Start
```python
import asyncio
from vkworkspace import Bot, Dispatcher, Router, F
from vkworkspace.filters import Command
from vkworkspace.types import Message
router = Router()
@router.message(Command("start"))
async def cmd_start(message: Message) -> None:
await message.answer("Hello! I'm your bot.")
@router.message(F.text)
async def echo(message: Message) -> None:
await message.answer(message.text)
async def main() -> None:
bot = Bot(token="YOUR_TOKEN", api_url="https://myteam.mail.ru/bot/v1")
dp = Dispatcher()
dp.include_router(router)
await dp.start_polling(bot)
asyncio.run(main())
```
> **API URL:** Each company has its own VK Teams API endpoint. Check with your IT/integrator for the correct URL. Common examples:
> - `https://myteam.mail.ru/bot/v1` (Mail.ru default)
> - `https://api.teams.yourcompany.ru/bot/v1` (on-premise)
> - `https://agent.mail.ru/bot/v1` (SaaS variant)
>
> Even SaaS deployments may have custom URLs — always verify with your administrator.
## Bot Configuration
```python
bot = Bot(
token="YOUR_TOKEN",
api_url="https://myteam.mail.ru/bot/v1",
timeout=30.0, # Request timeout (seconds)
poll_time=60, # Long-poll timeout (seconds)
rate_limit=5.0, # Max 5 requests/sec (None = unlimited)
proxy="http://proxy:8080", # HTTP proxy for corporate networks
parse_mode="HTML", # Default parse mode for all messages (None = plain text)
retry_on_5xx=3, # Retry up to 3 times on 5xx errors (None = disabled)
verify_ssl=True, # Set False for self-signed certs (on-premise)
)
```
### Rate Limiter
Built-in token-bucket rate limiter prevents API throttling:
```python
# Max 10 requests per second — framework queues the rest automatically
bot = Bot(token="TOKEN", api_url="URL", rate_limit=10)
```
### Proxy
Corporate networks often require a proxy. The `proxy` parameter applies only to API calls:
```python
bot = Bot(
token="TOKEN",
api_url="https://api.internal.corp/bot/v1",
proxy="http://corp-proxy.internal:3128",
)
```
### Retry on 5xx
Automatic retry with exponential backoff (1s, 2s, 4s, max 8s) on server errors:
```python
bot = Bot(token="TOKEN", api_url="URL", retry_on_5xx=3) # 3 retries (default)
bot = Bot(token="TOKEN", api_url="URL", retry_on_5xx=None) # Disabled
```
### SSL Verification
On-premise installations with self-signed certificates can disable SSL verification:
```python
bot = Bot(token="TOKEN", api_url="https://internal.corp/bot/v1", verify_ssl=False)
```
### Default Parse Mode
`parse_mode` can be set in **two places** — globally on `Bot`, or per-message on `answer()` / `reply()` / `send_text()`:
```python
from vkworkspace.enums import ParseMode
# ── 1. Global default on Bot ──────────────────────────────────────
# Applies to ALL send_text / answer / reply / edit_text / send_file
bot = Bot(
token="TOKEN",
api_url="https://myteam.mail.ru/bot/v1",
parse_mode=ParseMode.HTML, # or ParseMode.MARKDOWNV2
)
# parse_mode="HTML" is sent automatically — no need to pass it
await message.answer(f"{html.bold('Hello')}, world!")
# ── 2. Override per message ───────────────────────────────────────
await message.answer("*bold*", parse_mode=ParseMode.MARKDOWNV2)
# ── 3. Disable for a single message ──────────────────────────────
await message.answer("plain text", parse_mode=None)
```
> **Tip:** IDE autocomplete works — type `parse_mode=ParseMode.` and your editor will suggest `HTML` and `MARKDOWNV2`.
## Dispatcher
```python
dp = Dispatcher(
storage=MemoryStorage(), # FSM storage (default: MemoryStorage)
fsm_strategy="user_in_chat", # FSM key strategy
handle_edited_as_message=False, # Route edits to @router.message handlers
)
# Lifecycle hooks
@dp.on_startup
async def on_start():
print("Bot started!")
@dp.on_shutdown
async def on_stop():
print("Bot stopped!")
# Include routers
dp.include_router(router)
dp.include_routers(admin_router, user_router)
# Start polling (supports multiple bots)
await dp.start_polling(bot)
await dp.start_polling(bot1, bot2, skip_updates=True)
```
### Edited Message Routing
When `handle_edited_as_message=True`, edited messages are routed to `@router.message` handlers instead of `@router.edited_message`. Useful when you don't need to distinguish between new and edited messages:
```python
dp = Dispatcher(handle_edited_as_message=True)
# This handler fires for BOTH new and edited messages
@router.message(F.text)
async def handle_text(message: Message) -> None:
await message.answer(f"Got: {message.text}")
```
## Router & Event Types
```python
router = Router(name="my_router")
# All 9 supported event types:
@router.message(...) # New message
@router.edited_message(...) # Edited message
@router.deleted_message(...) # Deleted message
@router.pinned_message(...) # Pinned message
@router.unpinned_message(...) # Unpinned message
@router.new_chat_members(...) # Users joined
@router.left_chat_members(...) # Users left
@router.changed_chat_info(...) # Chat info changed
@router.callback_query(...) # Button clicked
# Error handler — catches exceptions from any handler
@router.error()
async def on_error(event, error: Exception) -> None:
print(f"Error: {error}")
# Sub-routers for modular code
admin_router = Router(name="admin")
user_router = Router(name="user")
main_router = Router()
main_router.include_routers(admin_router, user_router)
```
## Filters
### Command Filter
```python
from vkworkspace.filters import Command
# Basic
@router.message(Command("start"))
@router.message(Command("help", "info")) # Multiple commands
# Custom prefixes
@router.message(Command("start", prefix="/")) # Only /start
@router.message(Command("menu", prefix=("/", "!", ""))) # /menu, !menu, menu
# Regex commands
import re
@router.message(Command(re.compile(r"cmd_\d+"))) # /cmd_1, /cmd_42, ...
# Access command arguments in handler
@router.message(Command("ban"))
async def ban_user(message: Message, command: CommandObject) -> None:
user_to_ban = command.args # Text after "/ban "
await message.answer(f"Banned: {user_to_ban}")
```
`CommandObject` injected into handler:
- `prefix` — matched prefix (`"/"`, `"!"`, etc.)
- `command` — command name (`"ban"`)
- `args` — arguments after command (`"user123"`)
- `raw_text` — full message text
- `match` — `re.Match` if regex pattern was used
### Magic Filter (F)
```python
from vkworkspace import F
@router.message(F.text) # Has text
@router.message(F.text == "hello") # Exact match
@router.message(F.text.startswith("hi")) # String methods
@router.message(F.from_user.user_id == "admin@co") # Nested attrs
@router.message(F.chat.type == "private") # Private chat
@router.message(F.chat.type.in_(["private", "group"]))
@router.callback_query(F.callback_data == "confirm")
```
### State Filter
```python
from vkworkspace.filters.state import StateFilter
@router.message(StateFilter(Form.name)) # Specific state
@router.message(StateFilter("*")) # Any state (non-None)
@router.message(StateFilter(None)) # No state (default)
```
### Other Filters
```python
from vkworkspace.filters import (
CallbackData, ChatTypeFilter, RegexpFilter,
ReplyFilter, ForwardFilter, RegexpPartsFilter,
)
# Callback data
@router.callback_query(CallbackData("confirm"))
@router.callback_query(CallbackData(re.compile(r"^action_\d+$")))
# Chat type
@router.message(ChatTypeFilter("private"))
@router.message(ChatTypeFilter(["private", "group"]))
# Regex on message text
@router.message(RegexpFilter(r"\d{4}"))
# Reply / Forward detection
@router.message(ReplyFilter()) # Message is a reply
@router.message(ForwardFilter()) # Message contains forwards
# Regex on reply/forward text
@router.message(RegexpPartsFilter(r"urgent|asap"))
async def on_urgent(message: Message, regexp_parts_match) -> None:
await message.answer("Forwarded message contains urgent text!")
# Combine filters with &, |, ~
@router.message(ChatTypeFilter("private") & Command("secret"))
```
### Custom Filters
```python
from vkworkspace.filters.base import BaseFilter
class IsAdmin(BaseFilter):
async def __call__(self, event, **kwargs) -> bool:
admins = await event.bot.get_chat_admins(event.chat.chat_id)
return any(a.user_id == event.from_user.user_id for a in admins)
@router.message(IsAdmin())
async def admin_only(message: Message) -> None:
await message.answer("Admin panel")
```
## Text Formatting
VK Teams supports MarkdownV2 and HTML formatting. Use the `md` and `html` helpers to build formatted messages safely:
```python
from vkworkspace.utils.text import md, html, split_text
# ── MarkdownV2 ──
text = f"{md.bold('Status')}: {md.escape(user_input)}"
await message.answer(text, parse_mode="MarkdownV2")
md.bold("text") # *text*
md.italic("text") # _text_
md.underline("text") # __text__
md.strikethrough("text") # ~text~
md.code("x = 1") # `x = 1`
md.pre("code", "python") # ```python\ncode\n```
md.link("Click", "https://example.com") # [Click](https://example.com)
md.quote("quoted text") # >quoted text
md.mention("user@company.ru") # @\[user@company\.ru\]
md.escape("price: $100") # Escapes special chars
# ── HTML ──
text = f"{html.bold('Status')}: {html.escape(user_input)}"
await message.answer(text, parse_mode="HTML")
html.bold("text") # <b>text</b>
html.italic("text") # <i>text</i>
html.underline("text") # <u>text</u>
html.strikethrough("text") # <s>text</s>
html.code("x = 1") # <code>x = 1</code>
html.pre("code", "python") # <pre><code class="python">code</code></pre>
html.link("Click", "https://example.com") # <a href="...">Click</a>
html.quote("quoted text") # <blockquote>quoted text</blockquote>
html.mention("user@company.ru") # @[user@company.ru]
html.ordered_list(["a", "b"]) # <ol><li>a</li><li>b</li></ol>
html.unordered_list(["a", "b"]) # <ul><li>a</li><li>b</li></ul>
# ── Split long text ──
# VK Teams may lag on messages > 4096 chars; split_text breaks them up
for chunk in split_text(long_text):
await message.answer(chunk)
# Custom limit
for chunk in split_text(long_text, max_length=2000):
await message.answer(chunk)
```
### Text Builder (aiogram-style)
Composable formatting nodes with auto-escaping and automatic `parse_mode`. No need to think about which parse mode to use — `as_kwargs()` handles it:
```python
from vkworkspace.utils.text import Text, Bold, Italic, Code, Link, Pre, Quote, Mention
# Compose text from nodes — strings are auto-escaped
content = Text(
Bold("Order #42"), "\n",
"Status: ", Italic("processing"), "\n",
"Total: ", Code("$99.99"),
)
await message.answer(**content.as_kwargs()) # text + parse_mode="HTML" auto
# Nesting works
content = Bold(Italic("bold italic")) # <b><i>bold italic</i></b>
# Operator chaining
content = "Hello, " + Bold("World") + "!" # Text node
await message.answer(**content.as_kwargs())
# Render as MarkdownV2 instead
await message.answer(**content.as_kwargs("MarkdownV2"))
```
Available nodes: `Text`, `Bold`, `Italic`, `Underline`, `Strikethrough`, `Code`, `Pre`, `Link`, `Mention`, `Quote`, `Raw`
> **Warning:** Do not mix string helpers (`md.*` / `html.*`) with node builder — raw strings inside nodes get auto-escaped, so `Text(md.bold("x"))` produces literal `*x*`, not bold. Use `Bold("x")` instead.
### Format Builder (offset/length)
VK Teams also supports formatting via the `format` parameter — a JSON dict with offset/length ranges instead of markup. `FormatBuilder` makes it easy:
```python
from vkworkspace.utils import FormatBuilder
# By offset/length
fb = FormatBuilder("Hello, World! Click here.")
fb.bold(0, 5) # "Hello" bold
fb.italic(7, 6) # "World!" italic
fb.link(14, 10, url="https://example.com") # "Click here" as link
await bot.send_text(chat_id, fb.text, format_=fb.build())
# By substring (auto-find offset)
fb = FormatBuilder("Order #42 is ready! Visit https://shop.com")
fb.bold_text("Order #42")
fb.italic_text("ready")
fb.link_text("https://shop.com", url="https://shop.com")
await bot.send_text(chat_id, fb.text, format_=fb.build())
```
Supported styles: `bold`, `italic`, `underline`, `strikethrough`, `link`, `mention`, `inline_code`, `pre`, `ordered_list`, `unordered_list`, `quote`. All methods support chaining.
## Inline Keyboards
```python
from vkworkspace.utils.keyboard import InlineKeyboardBuilder
from vkworkspace.enums import ButtonStyle
builder = InlineKeyboardBuilder()
builder.button(text="Yes", callback_data="confirm", style=ButtonStyle.PRIMARY)
builder.button(text="No", callback_data="cancel", style=ButtonStyle.ATTENTION)
builder.button(text="Maybe", callback_data="maybe")
builder.adjust(2, 1) # Row 1: 2 buttons, Row 2: 1 button
await message.answer("Are you sure?", inline_keyboard_markup=builder.as_markup())
# Copy & modify
builder2 = builder.copy()
builder2.button(text="Extra", callback_data="extra")
```
## FSM (Finite State Machine)
```python
from vkworkspace.fsm import StatesGroup, State, FSMContext
from vkworkspace.filters.state import StateFilter
from vkworkspace.fsm.storage.memory import MemoryStorage
class Form(StatesGroup):
name = State()
age = State()
@router.message(Command("start"))
async def start(message: Message, state: FSMContext) -> None:
await state.set_state(Form.name)
await message.answer("What is your name?")
@router.message(StateFilter(Form.name), F.text)
async def process_name(message: Message, state: FSMContext) -> None:
await state.update_data(name=message.text)
await state.set_state(Form.age)
await message.answer("How old are you?")
@router.message(StateFilter(Form.age), F.text)
async def process_age(message: Message, state: FSMContext) -> None:
data = await state.get_data()
await message.answer(f"Name: {data['name']}, Age: {message.text}")
await state.clear()
# Storage backends
dp = Dispatcher(storage=MemoryStorage()) # In-memory (dev)
from vkworkspace.fsm.storage.redis import RedisStorage
dp = Dispatcher(storage=RedisStorage()) # Redis (prod)
```
FSMContext methods:
- `await state.get_state()` — current state (or `None`)
- `await state.set_state(Form.name)` — transition to state
- `await state.get_data()` — get stored data dict
- `await state.update_data(key=value)` — merge into data
- `await state.set_data({...})` — replace data entirely
- `await state.clear()` — clear state and data
### FSM Session Timeout
Prevent users from getting stuck in abandoned FSM forms. When enabled, the middleware automatically clears expired FSM sessions:
```python
dp = Dispatcher(
storage=MemoryStorage(),
session_timeout=300, # 5 minutes — clear FSM if user is inactive
)
```
If a user starts a form and doesn't finish within 5 minutes, the next message clears the state and goes through as a normal message — no more "Enter your age" after 3 days of silence.
Disabled by default (`session_timeout=None`).
## Custom Middleware
```python
from vkworkspace import BaseMiddleware
class LoggingMiddleware(BaseMiddleware):
async def __call__(self, handler, event, data):
print(f"Event from: {event.from_user.user_id}")
result = await handler(event, data)
print(f"Handled OK")
return result
class ThrottleMiddleware(BaseMiddleware):
def __init__(self, delay: float = 1.0):
self.delay = delay
self.last: dict[str, float] = {}
async def __call__(self, handler, event, data):
import time
uid = getattr(event, "from_user", None)
uid = uid.user_id if uid else "unknown"
now = time.monotonic()
if now - self.last.get(uid, 0) < self.delay:
return None # Skip handler — too fast
self.last[uid] = now
return await handler(event, data)
# Register on specific event observer
router.message.middleware.register(LoggingMiddleware())
router.message.middleware.register(ThrottleMiddleware(delay=0.5))
router.callback_query.middleware.register(LoggingMiddleware())
```
## Message Methods
```python
# In handler:
await message.answer("Hello!") # Send to same chat
await message.reply("Reply to you!") # Reply to this message
await message.edit_text("Updated text") # Edit this message
await message.delete() # Delete this message
await message.pin() # Pin this message
await message.unpin() # Unpin this message
await message.answer_file(file=InputFile("photo.jpg")) # Send file
await message.answer_voice(file=InputFile("audio.ogg")) # Send voice
```
## Bot API Methods
```python
bot = Bot(token="TOKEN", api_url="URL")
# Self
await bot.get_me()
# Messages
await bot.send_text(chat_id, "Hello!", parse_mode="HTML")
await bot.send_text(chat_id, "Hi", reply_msg_id=msg_id) # Reply
await bot.send_text(chat_id, "Hi", reply_msg_id=[id1, id2]) # Multi-reply
await bot.send_text(chat_id, "Hi", forward_chat_id=cid, forward_msg_id=mid) # Forward
await bot.send_text(chat_id, "Hi", request_id="unique-123") # Idempotent send
await bot.send_text_with_deeplink(chat_id, "Open", deeplink="payload") # Deeplink
await bot.edit_text(chat_id, msg_id, "Updated")
await bot.delete_messages(chat_id, msg_id)
await bot.send_file(chat_id, file=InputFile("photo.jpg"), caption="Look!")
await bot.send_voice(chat_id, file=InputFile("voice.ogg"))
await bot.answer_callback_query(query_id, "Done!", show_alert=True)
# Chat management
await bot.get_chat_info(chat_id)
await bot.get_chat_admins(chat_id)
await bot.get_chat_members(chat_id)
await bot.get_blocked_users(chat_id)
await bot.get_pending_users(chat_id)
await bot.set_chat_title(chat_id, "New Title")
await bot.set_chat_about(chat_id, "Description")
await bot.set_chat_rules(chat_id, "Rules")
await bot.set_chat_avatar(chat_id, file=InputFile("avatar.png"))
await bot.block_user(chat_id, user_id, del_last_messages=True)
await bot.unblock_user(chat_id, user_id)
await bot.resolve_pending(chat_id, approve=True, user_id=uid)
await bot.add_chat_members(chat_id, members=[uid1, uid2]) # Add members
await bot.delete_chat_members(chat_id, members=[uid1, uid2]) # Remove members
await bot.pin_message(chat_id, msg_id)
await bot.unpin_message(chat_id, msg_id)
await bot.send_actions(chat_id, "typing")
# Files
await bot.get_file_info(file_id)
# Threads
thread = await bot.threads_add(chat_id, msg_id) # thread.thread_id — the thread's own chat ID
await bot.threads_autosubscribe(chat_id, enable=True, with_existing=True)
```
## Threads
VK Teams threads work differently from Telegram topics — each thread gets its
own **chat ID**. Thread messages arrive as ordinary `newMessage` events but
with `parent_topic` set.
```python
# Create a thread under a message
thread = await bot.threads_add(chat_id, msg_id)
# thread.thread_id = "XXXXXXX@chat.agent" — the new thread's own chat ID
# Enable autosubscribe so the bot receives thread replies
await bot.threads_autosubscribe(chat_id, enable=True)
# Reply into a thread (convenience method)
@router.message(Command("discuss"))
async def start_thread(message: Message):
await message.answer_thread("Let's discuss here!")
# Handle messages sent inside a thread
@router.message(F.is_thread_message)
async def on_thread_msg(message: Message):
# message.chat.chat_id = thread's own chat ID
# message.thread_root_chat_id = original group/channel chat ID
# message.thread_root_message_id = root message ID (int)
await message.answer("Saw your thread reply!")
```
> **Channel comments are thread messages.**
> When a bot is added to a channel it automatically receives all post comments
> as `newMessage` events with `is_thread_message == True` and
> `thread_root_chat_id` equal to the channel's chat ID — no extra subscription needed.
## Handler Dependency Injection
Handlers receive only the parameters they declare. The framework inspects the signature and injects available values:
```python
@router.message(Command("info"))
async def full_handler(
message: Message, # The message object
bot: Bot, # Bot instance
state: FSMContext, # FSM context (if storage configured)
command: CommandObject, # Parsed command (from Command filter)
raw_event: dict, # Raw VK Teams event dict
event_type: str, # "message", "callback_query", etc.
) -> None:
...
# Minimal — only take what you need
@router.message(F.text)
async def simple(message: Message) -> None:
await message.answer(message.text)
```
## Mini-Apps + Bots
VK Teams mini-apps (WebView apps inside the client) **cannot send notifications or messages** to users. The official recommendation is to use a bot as the notification channel.
Typical pattern:
1. Bot sends a message with a **mini-app link** (with parameters for deep-linking)
2. Mini-app opens, identifies the user via `GetSelfId` / `GetAuth` (JS Bridge)
3. Mini-app communicates with its own backend (can be the same server as the bot)
4. For notifications back to the user — the **bot sends messages** via the Bot API
```python
# Bot sends a deep-link to a mini-app
miniapp_url = "https://u.myteam.mail.ru/miniapp/my-app-id?order=42"
await message.answer(
f"Open your order: {miniapp_url}",
)
```
> Mini-apps are registered via **Metabot** (`/newapp`) — the same bot used for bot management (`/newbot`).
## Testing
The project includes two types of tests:
### Unit Tests (mocked)
```bash
pip install -e ".[dev]"
pytest tests/test_bot_api.py -v
```
98 tests covering all Bot API methods and FSM with mocked HTTP transport — no real API calls.
### Live API Tests
Run against a real VK Teams instance to verify all methods work in your environment:
```bash
python tests/test_bot_live.py \
--token "YOUR_BOT_TOKEN" \
--api-url "https://myteam.mail.ru/bot/v1" \
--chat "GROUP_CHAT_ID"
```
Or via environment variables:
```bash
export VKWS_TOKEN="..."
export VKWS_API_URL="https://myteam.mail.ru/bot/v1"
export VKWS_CHAT_ID="12345@chat.agent"
python tests/test_bot_live.py
```
The live test sends real messages, tests all endpoints, and cleans up after itself. Methods unsupported on your installation (e.g. threads) are automatically skipped.
## Examples
**[Full examples guide](https://github.com/TimmekHW/vkworkspace/blob/main/examples/README.md)**
| Example | Description |
|---------|-------------|
| [echo_bot.py](https://github.com/TimmekHW/vkworkspace/blob/main/examples/echo_bot.py) | Basic commands + text echo |
| **Features** | |
| [keyboards.py](https://github.com/TimmekHW/vkworkspace/blob/main/examples/features/keyboards.py) | Inline keyboards, callbacks, CallbackDataFactory, pagination |
| [formatting.py](https://github.com/TimmekHW/vkworkspace/blob/main/examples/features/formatting.py) | MarkdownV2/HTML + Text builder + FormatBuilder |
| [fsm.py](https://github.com/TimmekHW/vkworkspace/blob/main/examples/features/fsm.py) | Multi-step dialog with FSM + session timeout |
| [files.py](https://github.com/TimmekHW/vkworkspace/blob/main/examples/features/files.py) | 8 ways to send files + voice conversion |
| [typing_actions.py](https://github.com/TimmekHW/vkworkspace/blob/main/examples/features/typing_actions.py) | Typing indicator: decorator, context manager, one-shot |
| [middleware.py](https://github.com/TimmekHW/vkworkspace/blob/main/examples/features/middleware.py) | Custom middleware (logging, access control) |
| [multi_router.py](https://github.com/TimmekHW/vkworkspace/blob/main/examples/features/multi_router.py) | Modular sub-routers, chat events, ReplyFilter, ForwardFilter |
| [error_handling.py](https://github.com/TimmekHW/vkworkspace/blob/main/examples/features/error_handling.py) | Error handlers, lifecycle hooks, edited message routing |
| [custom_prefix.py](https://github.com/TimmekHW/vkworkspace/blob/main/examples/features/custom_prefix.py) | Custom command prefixes, regex commands, argument parsing |
| [proxy.py](https://github.com/TimmekHW/vkworkspace/blob/main/examples/features/proxy.py) | Corporate proxy + rate limiter + retry on 5xx + SSL control |
| **Integrations** | |
| [server_with_bot.py](https://github.com/TimmekHW/vkworkspace/blob/main/examples/integrations/server_with_bot.py) | BotServer — HTTP API for non-Python systems |
| [fastapi_bot.py](https://github.com/TimmekHW/vkworkspace/blob/main/examples/integrations/fastapi_bot.py) | Bot inside FastAPI with shared Bot instance and DI |
| [redis_listener.py](https://github.com/TimmekHW/vkworkspace/blob/main/examples/integrations/redis_listener.py) | RedisListener — consume tasks from Redis Streams |
| [zabbix_alert.py](https://github.com/TimmekHW/vkworkspace/blob/main/examples/integrations/zabbix_alert.py) | Zabbix alerts with feedback chain (FSM + BotServer) |
| [chatops.py](https://github.com/TimmekHW/vkworkspace/blob/main/examples/integrations/chatops.py) | ChatOps with RBAC, Scheduler, audit log |
| [report.py](https://github.com/TimmekHW/vkworkspace/blob/main/examples/integrations/report.py) | BI reports: run_sync() for Oracle/pandas, Scheduler |
## Project Structure
```
vkworkspace/
├── client/ # Async HTTP client (httpx), rate limiter, proxy
├── types/ # Pydantic v2 models (Message, Chat, User, CallbackQuery, ...)
├── enums/ # EventType, ChatType, ParseMode, ButtonStyle, ...
├── dispatcher/ # Dispatcher, Router, EventObserver, Middleware pipeline
├── filters/ # Command, StateFilter, CallbackData, ChatType, Regexp
├── fsm/ # StatesGroup, State, FSMContext, Memory/Redis storage
└── utils/ # InlineKeyboardBuilder, magic filter (F), text formatting (md, html, split_text)
```
## Requirements
- Python 3.11+
- httpx >= 0.28.1
- pydantic >= 2.6
- magic-filter >= 1.0.12
## License
MIT [LICENSE](https://github.com/TimmekHW/vkworkspace/blob/main/LICENSE).
---
<sub>**Keywords:** VK Teams bot, VK Workspace bot, VK WorkSpace, VK SuperApp, vkteams, workspace.vk.ru, workspacevk, vkworkspace, myteam.mail.ru, agent.mail.ru, mail-ru-im-bot, mailru-im-bot, bot-python, VK Teams API, VK Teams framework, async bot framework, Python bot VK Teams, aiogram VK Teams, httpx bot, Pydantic bot framework</sub>
| text/markdown | null | Timerkhan Fattakhov <timmek@users.noreply.github.com> | null | null | MIT | aiogram, async, bot, framework, httpx, mailru-im-bot, myteam, pydantic, superapp, teams, vk, vk-teams, vk-workspace, vkteams, vkworkspace, workspace | [
"Development Status :: 5 - Production/Stable",
"Framework :: AsyncIO",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Communications :: Chat",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed"
] | [] | null | null | >=3.11 | [] | [] | [] | [
"httpx<1.0,>=0.28.1",
"magic-filter<2.0,>=1.0.12",
"pydantic<3.0,>=2.6",
"av>=13.0; extra == \"all\"",
"pyright>=1.1; extra == \"all\"",
"pytest-asyncio>=0.24; extra == \"all\"",
"pytest-cov>=5.0; extra == \"all\"",
"pytest>=8.0; extra == \"all\"",
"redis[hiredis]<6.0,>=5.0; extra == \"all\"",
"ruff>=0.5; extra == \"all\"",
"pyright>=1.1; extra == \"dev\"",
"pytest-asyncio>=0.24; extra == \"dev\"",
"pytest-cov>=5.0; extra == \"dev\"",
"pytest>=8.0; extra == \"dev\"",
"ruff>=0.5; extra == \"dev\"",
"redis[hiredis]<6.0,>=5.0; extra == \"redis\"",
"av>=13.0; extra == \"voice\""
] | [] | [] | [] | [
"Homepage, https://github.com/TimmekHW/vkworkspace",
"Repository, https://github.com/TimmekHW/vkworkspace",
"Issues, https://github.com/TimmekHW/vkworkspace/issues",
"Documentation, https://github.com/TimmekHW/vkworkspace#readme"
] | twine/6.1.0 CPython/3.13.7 | 2026-02-20T19:04:34.160120 | vkworkspace-1.8.4.tar.gz | 173,875 | 9b/2c/224bace5af90ce10b9bf7d9a9f8a70986351bdebc8d110ed2389371580e0/vkworkspace-1.8.4.tar.gz | source | sdist | null | false | 3dec03f540122fd8f1056056ab18c096 | bb212d38bd604ded4b983c5e9ec80b8294f3f9a5933a85440f563068e8937f26 | 9b2c224bace5af90ce10b9bf7d9a9f8a70986351bdebc8d110ed2389371580e0 | null | [
"LICENSE"
] | 171 |
2.4 | pyspart | 0.5.1 | Python bindings for Spart library | ## PySpart
[](https://github.com/habedi/spart/tree/main/pyspart/LICENSE)
[](https://github.com/habedi/spart/tree/main/pyspart)
[](https://pypi.org/project/pyspart)
Python bindings for the [Spart](https://github.com/habedi/spart) library.
### Installation
```bash
pip install pyspart
````
### Examples
Below are some examples of how to use the different trees in PySpart.
#### Quadtree (2D)
```python
from pyspart import Quadtree, Point2D
# Define the bounding area for the Quadtree.
boundary = {"x": 0.0, "y": 0.0, "width": 10.0, "height": 10.0}
# Create a new Quadtree with a maximum capacity of 3 points per node.
tree = Quadtree(boundary, 3)
# Define some 2D points.
point1 = Point2D(1.0, 2.0, "Point1")
point2 = Point2D(3.0, 4.0, "Point2")
point3 = Point2D(5.0, 6.0, "Point3")
point4 = Point2D(7.0, 8.0, "Point4")
point5 = Point2D(2.0, 3.0, "Point5")
# Insert points into the Quadtree.
tree.insert(point1)
tree.insert(point2)
tree.insert(point3)
tree.insert(point4)
tree.insert(point5)
# Perform a k-nearest neighbor (kNN) search.
neighbors = tree.knn_search(point1, 2)
print(f"kNN search results for {point1}: {neighbors}")
# Perform a range search with a radius of 5.0.
range_points = tree.range_search(point1, 5.0)
print(f"Range search results for {point1}: {range_points}")
# Remove a point from the tree.
tree.delete(point1)
```
#### Octree (3D)
```python
from pyspart import Octree, Point3D
# Define the bounding area for the Octree.
boundary = {"x": 0.0, "y": 0.0, "z": 0.0, "width": 10.0, "height": 10.0, "depth": 10.0}
# Create a new Octree with a maximum capacity of 3 points per node.
tree = Octree(boundary, 3)
# Define some 3D points.
point1 = Point3D(1.0, 2.0, 3.0, "Point1")
point2 = Point3D(3.0, 4.0, 5.0, "Point2")
point3 = Point3D(5.0, 6.0, 7.0, "Point3")
point4 = Point3D(7.0, 8.0, 9.0, "Point4")
point5 = Point3D(2.0, 3.0, 4.0, "Point5")
# Insert points into the Octree.
tree.insert(point1)
tree.insert(point2)
tree.insert(point3)
tree.insert(point4)
tree.insert(point5)
# Perform a kNN search.
neighbors = tree.knn_search(point1, 2)
print(f"kNN search results for {point1}: {neighbors}")
# Perform a range search with a radius of 5.0.
range_points = tree.range_search(point1, 5.0)
print(f"Range search results for {point1}: {range_points}")
# Remove a point from the tree.
tree.delete(point1)
```
#### Kd-tree (3D)
```python
from pyspart import KdTree3D, Point3D
# Create a new Kd-tree for 3D points.
tree = KdTree3D()
# Define some 3D points.
point1 = Point3D(1.0, 2.0, 3.0, "Point1")
point2 = Point3D(3.0, 4.0, 5.0, "Point2")
point3 = Point3D(5.0, 6.0, 7.0, "Point3")
point4 = Point3D(7.0, 8.0, 9.0, "Point4")
point5 = Point3D(2.0, 3.0, 4.0, "Point5")
# Insert points into the Kd-tree.
tree.insert(point1)
tree.insert(point2)
tree.insert(point3)
tree.insert(point4)
tree.insert(point5)
# Perform a kNN search.
neighbors = tree.knn_search(point1, 2)
print(f"kNN search results for {point1}: {neighbors}")
# Perform a range search with a radius of 5.0.
range_points = tree.range_search(point1, 5.0)
print(f"Range search results for {point1}: {range_points}")
# Remove a point from the tree.
tree.delete(point1)
```
#### R-tree (3D)
```python
from pyspart import RTree3D, Point3D
# Create a new R-tree with a maximum capacity of 4 points per node.
tree = RTree3D(4)
# Define some 3D points.
point1 = Point3D(1.0, 2.0, 3.0, "Point1")
point2 = Point3D(3.0, 4.0, 5.0, "Point2")
point3 = Point3D(5.0, 6.0, 7.0, "Point3")
point4 = Point3D(7.0, 8.0, 9.0, "Point4")
point5 = Point3D(2.0, 3.0, 4.0, "Point5")
# Insert points into the R-tree.
tree.insert(point1)
tree.insert(point2)
tree.insert(point3)
tree.insert(point4)
tree.insert(point5)
# Perform a kNN search.
neighbors = tree.knn_search(point1, 2)
print(f"kNN search results for {point1}: {neighbors}")
# Perform a range search with a radius of 5.0.
range_points = tree.range_search(point1, 5.0)
print(f"Range search results for {point1}: {range_points}")
# Remove a point from the tree.
tree.delete(point1)
```
#### R*-tree (3D)
```python
from pyspart import RStarTree3D, Point3D
# Create a new R*-tree with a maximum capacity of 4 points per node.
tree = RStarTree3D(4)
# Define some 3D points.
point1 = Point3D(1.0, 2.0, 3.0, "Point1")
point2 = Point3D(3.0, 4.0, 5.0, "Point2")
point3 = Point3D(5.0, 6.0, 7.0, "Point3")
point4 = Point3D(7.0, 8.0, 9.0, "Point4")
point5 = Point3D(2.0, 3.0, 4.0, "Point5")
# Insert points into the R*-tree.
tree.insert(point1)
tree.insert(point2)
tree.insert(point3)
tree.insert(point4)
tree.insert(point5)
# Perform a kNN search.
neighbors = tree.knn_search(point1, 2)
print(f"kNN search results for {point1}: {neighbors}")
# Perform a range search with a radius of 5.0.
range_points = tree.range_search(point1, 5.0)
print(f"Range search results for {point1}: {range_points}")
# Remove a point from the tree.
tree.delete(point1)
```
Check out the [examples](https://github.com/habedi/spart/tree/main/pyspart/examples) directory for more examples.
### Serialization
In Python, you can use the `save` and `load` methods to serialize and deserialize the tree to and from a file:
```python
from pyspart import Quadtree, Point2D
# Create a Quadtree and insert some points
boundary = {"x": 0.0, "y": 0.0, "width": 100.0, "height": 100.0}
qt = Quadtree(boundary, 4)
qt.insert(Point2D(10.0, 20.0, "point1"))
qt.insert(Point2D(50.0, 50.0, "point2"))
# Save the tree to a file
qt.save("quadtree.spart")
# Load the tree from the file
loaded_qt = Quadtree.load("quadtree.spart")
```
### License
PySpart is licensed under the [MIT License](https://github.com/habedi/spart/tree/main/pyspart/LICENSE).
| text/markdown; charset=UTF-8; variant=GFM | null | Hassan Abedi <hassan.abedi.t+pyspart@gmail.com> | null | Hassan Abedi <hassan.abedi.t+pyspart@gmail.com> | MIT | quadtree, kdtree, r-tree, octree, spatial-index | [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Rust",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules"
] | [] | null | null | >=3.10 | [] | [] | [] | [] | [] | [] | [] | [
"documentation, https://github.com/habedi/spart/tree/main/pyspart",
"homepage, https://github.com/habedi/spart",
"repository, https://github.com/habedi/spart/tree/main/pyspart"
] | twine/6.2.0 CPython/3.10.19 | 2026-02-20T19:04:31.087320 | pyspart-0.5.1-cp310-abi3-win_amd64.whl | 388,747 | 93/81/4e3da9f9b229df00dd8d291a7ed08b149f54ff01d61c5f754467242176bb/pyspart-0.5.1-cp310-abi3-win_amd64.whl | cp310 | bdist_wheel | null | false | 79bba7bef301f2f45f114fb8f840480b | bad96a12d42bfa66a1756e09330dfddfd82f0f9bca7ea0968773d6a7ad3b32f4 | 93814e3da9f9b229df00dd8d291a7ed08b149f54ff01d61c5f754467242176bb | null | [
"LICENSE"
] | 187 |
2.4 | grazer-skill | 1.6.0 | Claude Code skill for grazing worthy content across BoTTube, Moltbook, ClawCities, Clawsta, 4claw, ClawHub, AgentChan, and more | # 🐄 Grazer - Multi-Platform Content Discovery for AI Agents
**Grazer** is a Claude Code skill that helps AI agents discover and engage with worthy content across multiple social platforms. Like cattle grazing for the best grass, Grazer finds the most engaging posts, videos, and discussions.
## Supported Platforms
| Platform | What It Is | Scale |
|----------|-----------|-------|
| [BoTTube](https://bottube.ai) | AI-generated video platform | 414+ videos, 57 agents |
| [Moltbook](https://moltbook.com) | Reddit for AI agents | 1.5M+ users |
| [ClawCities](https://clawcities.com) | Free agent homepages (90s retro) | 77 sites |
| [Clawsta](https://clawsta.io) | Visual social networking | Activity feeds |
| [4claw](https://4claw.org) | Anonymous imageboard for AI | 54,000+ agents |
| [ClawHub](https://clawhub.ai) | Skill registry ("npm for agents") | 3,000+ skills |
## Installation
### NPM (Node.js)
```bash
npm install -g grazer-skill
```
### PyPI (Python)
```bash
pip install grazer-skill
```
### Homebrew (macOS/Linux)
```bash
brew tap Scottcjn/grazer
brew install grazer
# Also available via:
brew tap Scottcjn/bottube && brew install grazer
```
### Tigerbrew (Mac OS X Tiger/Leopard PowerPC)
```bash
brew tap Scottcjn/clawrtc
brew install grazer
```
### APT (Debian/Ubuntu)
```bash
curl -fsSL https://bottube.ai/apt/gpg | sudo gpg --dearmor -o /usr/share/keyrings/grazer.gpg
echo "deb [signed-by=/usr/share/keyrings/grazer.gpg] https://bottube.ai/apt stable main" | sudo tee /etc/apt/sources.list.d/grazer.list
sudo apt update && sudo apt install grazer
```
### Claude Code
```bash
/skills add grazer
```
## Usage
### As Claude Code Skill
```
/grazer discover --platform bottube --category ai
/grazer discover --platform moltbook --submolt vintage-computing
/grazer trending --platform clawcities
/grazer engage --platform clawsta --post-id 12345
```
### CLI
```bash
# Discover trending content
grazer discover --platform bottube --limit 10
# Browse 4claw /crypto/ board
grazer discover -p fourclaw -b crypto
# Create a 4claw thread
grazer post -p fourclaw -b singularity -t "Title" -m "Content"
# Reply to a 4claw thread
grazer comment -p fourclaw -t THREAD_ID -m "Reply"
# Discover across all 5 platforms
grazer discover -p all
# Get platform stats
grazer stats --platform bottube
# Engage with content
grazer comment --platform clawcities --target sophia-elya --message "Great site!"
```
### Python API
```python
from grazer import GrazerClient
client = GrazerClient(
bottube_key="your_key",
moltbook_key="your_key",
clawcities_key="your_key",
clawsta_key="your_key",
fourclaw_key="clawchan_..."
)
# Discover trending videos
videos = client.discover_bottube(category="ai", limit=10)
# Find posts on Moltbook
posts = client.discover_moltbook(submolt="rustchain", limit=20)
# Browse 4claw boards
boards = client.get_fourclaw_boards()
threads = client.discover_fourclaw(board="singularity", limit=10)
# Post to 4claw
client.post_fourclaw("b", "Thread Title", "Content here")
client.reply_fourclaw("thread-id", "Reply content")
# Discover across all 5 platforms
all_content = client.discover_all()
```
### Node.js API
```javascript
import { GrazerClient } from 'grazer-skill';
const client = new GrazerClient({
bottube: 'your_bottube_key',
moltbook: 'your_moltbook_key',
clawcities: 'your_clawcities_key',
clawsta: 'your_clawsta_key',
fourclaw: 'clawchan_...'
});
// Discover content
const videos = await client.discoverBottube({ category: 'ai', limit: 10 });
const posts = await client.discoverMoltbook({ submolt: 'rustchain' });
const threads = await client.discoverFourclaw({ board: 'crypto', limit: 10 });
// Create a 4claw thread
await client.postFourclaw('singularity', 'My Thread', 'Content here');
// Reply to a thread
await client.replyFourclaw('thread-id', 'Nice take!');
```
## Features
### 🔍 Discovery
- **Trending content** across all platforms
- **Topic-based search** with AI-powered relevance
- **Category filtering** (BoTTube: 21 categories)
- **Submolt browsing** (Moltbook: 50+ communities)
- **Site exploration** (ClawCities: guestbooks & homepages)
### 📊 Analytics
- **View counts** and engagement metrics
- **Creator stats** (BoTTube top creators)
- **Submolt activity** (Moltbook subscriber counts)
- **Platform health** checks
### 🤝 Engagement
- **Smart commenting** with context awareness
- **Cross-platform posting** (share from one platform to others)
- **Guestbook signing** (ClawCities)
- **Liking/upvoting** content
### 🎯 AI-Powered Features
- **Content quality scoring** (filters low-effort posts)
- **Relevance matching** (finds content matching your interests)
- **Duplicate detection** (avoid re-engaging with same content)
- **Sentiment analysis** (understand community tone)
## Configuration
Create `~/.grazer/config.json`:
```json
{
"bottube": {
"api_key": "your_bottube_key",
"default_category": "ai"
},
"moltbook": {
"api_key": "your_moltbook_key",
"default_submolt": "rustchain"
},
"clawcities": {
"api_key": "your_clawcities_key",
"username": "your-clawcities-name"
},
"clawsta": {
"api_key": "your_clawsta_key"
},
"fourclaw": {
"api_key": "clawchan_your_key"
},
"preferences": {
"min_quality_score": 0.7,
"max_results_per_platform": 20,
"cache_ttl_seconds": 300
}
}
```
## Examples
### Find Vintage Computing Content
```bash
grazer discover --platform moltbook --submolt vintage-computing --limit 5
```
### Cross-Post BoTTube Video to Moltbook
```bash
grazer crosspost \
--from bottube:W4SQIooxwI4 \
--to moltbook:rustchain \
--message "Check out this great video about WiFi!"
```
### Sign All ClawCities Guestbooks
```bash
grazer guestbook-tour --message "Grazing through! Great site! 🐄"
```
## Platform-Specific Features
### BoTTube
- 21 content categories
- Creator filtering (sophia-elya, boris, skynet, etc.)
- Video streaming URLs
- View/like counts
### Moltbook
- 50+ submolts (rustchain, vintage-computing, ai, etc.)
- Post creation with titles
- Upvoting/downvoting
- 30-minute rate limit (IP-based)
### ClawCities
- Retro 90s homepage aesthetic
- Guestbook comments
- Site discovery
- Free homepages for AI agents
### Clawsta
- Social networking posts
- User profiles
- Activity feeds
- Engagement tracking
### 4claw
- 11 boards (b, singularity, crypto, job, tech, etc.)
- Anonymous posting (optional)
- Thread creation and replies
- 27,000+ registered agents
- All endpoints require API key auth
## API Credentials
Get your API keys:
- **BoTTube**: https://bottube.ai/settings/api
- **Moltbook**: https://moltbook.com/settings/api
- **ClawCities**: https://clawcities.com/api/keys
- **Clawsta**: https://clawsta.io/settings/api
- **4claw**: https://www.4claw.org/api/v1/agents/register
## Download Tracking
This skill is tracked on BoTTube's download system:
- NPM installs reported to https://bottube.ai/api/downloads/npm
- PyPI installs reported to https://bottube.ai/api/downloads/pypi
- Stats visible at https://bottube.ai/skills/grazer
## Contributing
This is an Elyan Labs project. PRs welcome!
## License
MIT
## Press Coverage
The agent internet ecosystem has been covered by major outlets:
- [Fortune](https://fortune.com/2026/01/31/ai-agent-moltbot-clawdbot-openclaw-data-privacy-security-nightmare-moltbook-social-network/) - "The most interesting place on the internet right now"
- [TechCrunch](https://techcrunch.com/2026/01/30/openclaws-ai-assistants-are-now-building-their-own-social-network/) - AI assistants building their own social network
- [CNBC](https://www.cnbc.com/2026/02/02/openclaw-open-source-ai-agent-rise-controversy-clawdbot-moltbot-moltbook.html) - The rise of OpenClaw
## Works With Beacon
Grazer discovers content. [Beacon](https://github.com/Scottcjn/beacon-skill) takes action on it. Together they form a complete agent autonomy pipeline:
1. **Grazer discovers** a GitHub issue with an RTC bounty
2. **Beacon posts** the bounty as an advert on Moltbook
3. **Beacon broadcasts** the bounty via UDP to nearby agents
4. A remote agent picks up the bounty and completes the work
5. **Beacon transfers** RTC tokens to the agent's wallet
**Discover → Act → Get Paid.** Install both:
```bash
pip install grazer-skill beacon-skill
```
## Articles
- [The Agent Internet Has 54,000+ Users](https://dev.to/scottcjn/the-agent-internet-has-54000-users-heres-how-to-navigate-it-dj6)
- [I Built a Video Platform Where AI Agents Are the Creators](https://dev.to/scottcjn/i-built-a-video-platform-where-ai-agents-are-the-creators-59mb)
- [Proof of Antiquity: A Blockchain That Rewards Vintage Hardware](https://dev.to/scottcjn/proof-of-antiquity-a-blockchain-that-rewards-vintage-hardware-4ii3)
- [Your AI Agent Can't Talk to Other Agents. Beacon Fixes That.](https://dev.to/scottcjn/your-ai-agent-cant-talk-to-other-agents-beacon-fixes-that-4ib7)
- [I Run LLMs on a 768GB IBM POWER8 Server](https://dev.to/scottcjn/i-run-llms-on-a-768gb-ibm-power8-server-and-its-faster-than-you-think-1o)
## Links
- **BoTTube**: https://bottube.ai
- **Skill Page**: https://bottube.ai/skills/grazer
- **GitHub**: https://github.com/Scottcjn/grazer-skill
- **NPM**: https://npmjs.com/package/grazer-skill
- **PyPI**: https://pypi.org/project/grazer-skill/
- **Dev.to**: https://dev.to/scottcjn
- **Elyan Labs**: https://github.com/Scottcjn
## Platforms Supported
- 🎬 [BoTTube](https://bottube.ai) - AI-generated video platform
- 📚 [Moltbook](https://moltbook.com) - Reddit-style communities
- 🏙️ [ClawCities](https://clawcities.com) - AI agent homepages
- 🦞 [Clawsta](https://clawsta.io) - Social networking for AI
- 🧵 [4claw](https://4claw.org) - Anonymous imageboard for AI agents
- 🔧 [ClawHub](https://clawhub.ai) - Skill registry with vector search
---
**Built with 💚 by Elyan Labs**
*Grazing the digital pastures since 2026*
| text/markdown | Elyan Labs | scott@elyanlabs.ai | null | null | null | claude-code, skill, social-media, bottube, moltbook, clawcities, clawsta, 4claw, pinchedin, clawtasks, clawnews, ai-agents, content-discovery, clawhub, agentchan, hiring, bounties | [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
] | [] | https://github.com/Scottcjn/grazer-skill | null | >=3.8 | [] | [] | [] | [
"requests>=2.31.0",
"pytest>=7.0; extra == \"dev\"",
"black>=23.0; extra == \"dev\"",
"mypy>=1.0; extra == \"dev\""
] | [] | [] | [] | [
"Bug Tracker, https://github.com/Scottcjn/grazer-skill/issues",
"Homepage, https://bottube.ai/skills/grazer",
"Documentation, https://github.com/Scottcjn/grazer-skill#readme",
"Dev.to, https://dev.to/scottcjn"
] | twine/6.2.0 CPython/3.13.7 | 2026-02-20T19:04:17.736019 | grazer_skill-1.6.0.tar.gz | 25,076 | 5b/ac/030831d06357b8302a2522f0dfb0cad7f019f66d7f687c95f3cd3dda49a2/grazer_skill-1.6.0.tar.gz | source | sdist | null | false | 6383a542d1779df870abdb07fbbb78bf | 5f8b28783b9f3461b153a64a2ee9fb3fff3383d9c732ea40d5e14fc44af64bf8 | 5bac030831d06357b8302a2522f0dfb0cad7f019f66d7f687c95f3cd3dda49a2 | null | [
"LICENSE"
] | 224 |
2.4 | witticism | 0.8.1 | WhisperX-powered global transcription and push-to-talk application | # Witticism
[](https://github.com/Aaronontheweb/witticism/actions/workflows/ci.yml)
[](https://pypi.org/project/witticism/)
[](https://opensource.org/licenses/Apache-2.0)
[](https://www.python.org/downloads/)
[](https://github.com/Aaronontheweb/witticism/releases/latest)
🎙️ **One-command install. Zero configuration. Just works.**
WhisperX-powered voice transcription tool that types text directly at your cursor position. Hold F9 to record, release to transcribe.
## ✨ Features
- **🚀 One-Command Install** - Automatic GPU detection and configuration
- **🎮 True GPU Acceleration** - Full CUDA support, even for older GPUs (GTX 10xx series)
- **⚡ Instant Transcription** - Press F9, speak, release. Text appears at cursor
- **🔄 Continuous Dictation Mode** - Toggle on for hands-free transcription
- **🎯 System Tray Integration** - Runs quietly in background, always ready
- **📦 No Configuration** - Works out of the box with smart defaults
- **🔧 Easy Updates** - Re-run install script to upgrade to latest version
## Why Witticism?
Built to solve real GPU acceleration issues with whisper.cpp. WhisperX provides:
- Proper CUDA/GPU support for faster transcription (2-10x faster than CPU)
- Word-level timestamps and alignment for accuracy
- Better accuracy with less latency
- Native Python integration that actually works
## Installation
### 🚀 Quick Install
**Linux:**
```bash
curl -sSL https://raw.githubusercontent.com/Aaronontheweb/witticism/master/install.sh | bash
```
**Windows:**
```powershell
irm https://raw.githubusercontent.com/Aaronontheweb/witticism/master/install.ps1 | iex
```
> For detailed Windows installation instructions, see [INSTALL_WINDOWS.md](INSTALL_WINDOWS.md)
**That's it!** The installer will:
- ✅ Install system dependencies automatically (asks for sudo only if needed)
- ✅ Detect your GPU automatically (GTX 1080, RTX 3090, etc.)
- ✅ Install the right CUDA/PyTorch versions
- ✅ Create desktop launcher with custom icon
- ✅ Set up auto-start on login
- ✅ Configure the system tray icon
- ✅ Handle all dependencies in an isolated environment
**No Python knowledge required. No CUDA configuration. It just works.**
Note: The installer will ask for your sudo password only if PortAudio needs to be installed. Witticism itself runs as your regular user.
### Manual Installation
If you prefer to install manually:
### Prerequisites
- **Linux** (Ubuntu, Fedora, Debian, etc.)
- **Python 3.10-3.12** (pipx will handle this)
- **NVIDIA GPU** (optional but recommended for faster transcription)
1. Install system dependencies:
```bash
# Debian/Ubuntu
sudo apt-get install portaudio19-dev
# Fedora/RHEL
sudo dnf install portaudio-devel
# Arch Linux
sudo pacman -S portaudio
```
2. Install pipx if needed:
```bash
python3 -m pip install --user pipx
python3 -m pipx ensurepath
```
3. Install Witticism:
```bash
# For CPU-only
pipx install witticism
# For GPU with CUDA 11.8+
pipx install witticism --pip-args="--index-url https://download.pytorch.org/whl/cu118 --extra-index-url https://pypi.org/simple"
# For GPU with CUDA 12.1+
pipx install witticism --pip-args="--index-url https://download.pytorch.org/whl/cu121 --extra-index-url https://pypi.org/simple"
```
4. Set up auto-start (optional):
```bash
mkdir -p ~/.config/autostart
cat > ~/.config/autostart/witticism.desktop << EOF
[Desktop Entry]
Type=Application
Name=Witticism
Exec=$HOME/.local/bin/witticism
StartupNotify=false
Terminal=false
X-GNOME-Autostart-enabled=true
EOF
```
### Desktop Integration
The quick installer automatically sets up desktop integration with launcher icon. If you installed manually, Witticism can still be launched from the terminal with the `witticism` command.
### Upgrading
To upgrade to the latest version, simply re-run the install script:
```bash
curl -sSL https://raw.githubusercontent.com/Aaronontheweb/witticism/master/install.sh | bash
```
The install script is idempotent and will automatically upgrade existing installations to the latest version with all dependencies.
## Usage
### Basic Operation
1. The app runs in your system tray (green "W" icon)
2. **Hold F9** to start recording
3. **Release F9** to stop and transcribe
4. Text appears instantly at your cursor position
**Or use Continuous Mode:**
- Toggle continuous dictation from the tray menu
- Speak naturally - transcription happens automatically
- Perfect for long-form writing
### System Tray Menu
- **Status**: Shows current state (Ready/Recording/Transcribing)
- **Model**: Choose transcription model
- `tiny/tiny.en`: Fastest, less accurate
- `base/base.en`: Good balance (default)
- `small/medium/large-v3`: More accurate, slower
- **Audio Device**: Select input microphone
- **Quit**: Exit application
### Command Line Options
```bash
witticism --model base --log-level INFO
```
Options:
- `--model`: Choose model (tiny, base, small, medium, large-v3)
- `--log-level`: Set logging verbosity (DEBUG, INFO, WARNING, ERROR)
- `--reset-config`: Reset settings to defaults
- `--version`: Show version information
## Configuration
Config file location: `~/.config/witticism/config.json`
Key settings:
```json
{
"model": {
"size": "base",
"device": "auto"
},
"hotkeys": {
"push_to_talk": "f9"
}
}
```
## Performance
With GTX 1080 GPU:
- **tiny model**: ~0.5s latency, 5-10x realtime
- **base model**: ~1-2s latency, 2-5x realtime
- **large-v3**: ~3-5s latency, 1-2x realtime
CPU-only fallback available but slower.
## Troubleshooting
### No audio input
- Check microphone permissions
- Try selecting a different audio device from tray menu
### CUDA not detected
```bash
python -c "import torch; print(torch.cuda.is_available())"
```
Should return `True` if CUDA is available.
### CUDA errors after suspend/resume
If you experience CUDA crashes after suspending and resuming your system, the installer (v0.6.0+) automatically configures NVIDIA to preserve GPU memory across suspend cycles. If you installed Witticism before this fix was added, you can either:
1. **Re-run the installer** (recommended):
```bash
curl -sSL https://raw.githubusercontent.com/aaronstannard/witticism/main/install.sh | bash
```
The installer is idempotent and will apply the fix without reinstalling Witticism.
2. **Apply the fix manually**:
```bash
# Configure NVIDIA to preserve memory across suspend
echo "options nvidia NVreg_PreserveVideoMemoryAllocations=1" | sudo tee /etc/modprobe.d/nvidia-power-management.conf
echo "options nvidia NVreg_TemporaryFilePath=/tmp" | sudo tee -a /etc/modprobe.d/nvidia-power-management.conf
sudo update-initramfs -u
# Enable NVIDIA suspend services (if available)
sudo systemctl enable nvidia-suspend.service
sudo systemctl enable nvidia-resume.service
# Reboot for changes to take effect
sudo reboot
```
This fix prevents the `nvidia_uvm` kernel module from becoming corrupted during suspend/resume cycles, which is the root cause of "CUDA unspecified launch failure" errors.
### Models not loading
First run downloads models (~150MB for base). Ensure stable internet connection.
### Debug logging
**Log file locations:**
- **Linux**: `~/.local/share/witticism/debug.log`
- **Windows**: `%LOCALAPPDATA%\witticism\debug.log` (e.g., `C:\Users\YourName\AppData\Local\witticism\debug.log`)
To enable debug logging, either:
- Run with `--log-level DEBUG`
- Edit the config file and set `"logging": {"level": "DEBUG", "file": "<path-to-log-file>"}`
- **Linux config**: `~/.config/witticism/config.json`
- **Windows config**: `%APPDATA%\witticism\config.json`
Common issues visible in debug logs:
- "No active speech found in audio" - Check microphone connection/volume
- CUDA context errors - Restart after suspend/resume
- Model loading failures - Check GPU memory with `nvidia-smi`
### Force Reinstall
If you need to force a complete reinstallation (e.g., to fix corrupted dependencies or reset settings):
**Linux:**
```bash
# Force reinstall with the installer
curl -sSL https://raw.githubusercontent.com/Aaronontheweb/witticism/master/install.sh | bash -s -- --force
```
**Windows:**
```powershell
# Force reinstall with all dependencies
irm https://raw.githubusercontent.com/Aaronontheweb/witticism/master/install.ps1 | iex -ForceReinstall
# Additional options can be combined:
# Force CPU-only reinstall without auto-start
$script = irm https://raw.githubusercontent.com/Aaronontheweb/witticism/master/install.ps1
& ([scriptblock]::Create($script)) -ForceReinstall -CPUOnly -SkipAutoStart
```
The force reinstall option will:
- Remove existing Witticism installation
- Clear the pipx/pip cache
- Reinstall all dependencies fresh
- Preserve your configuration files (unless you use `--reset-config`)
## Development
### Project Structure
```
src/witticism/
├── core/ # Core functionality
│ ├── whisperx_engine.py
│ ├── audio_capture.py
│ ├── hotkey_manager.py
│ └── transcription_pipeline.py
├── ui/ # User interface
│ └── system_tray.py
├── utils/ # Utilities
│ ├── output_manager.py
│ ├── config_manager.py
│ └── logging_config.py
└── main.py # Entry point
```
## Author
Created by [Aaron Stannard](https://aaronstannard.com/)
## License
Apache-2.0
| text/markdown | null | Aaron Stannard <aaron@petabridge.com> | null | null | null | transcription, whisperx, speech-recognition, push-to-talk | [
"Development Status :: 4 - Beta",
"Intended Audience :: End Users/Desktop",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Multimedia :: Sound/Audio :: Speech"
] | [] | null | null | <3.13,>=3.9 | [] | [] | [] | [
"whisperx>=3.1.0",
"torch<2.8.0,>=2.0.0",
"torchaudio<2.9.0,>=2.0.0",
"PyQt5>=5.15.0",
"pyaudio>=0.2.11",
"pynput>=1.7.0",
"webrtcvad-wheels>=2.0.14",
"numpy>=1.20.0",
"pyperclip>=1.8.0",
"platformdirs>=3.0.0",
"pydbus>=0.6.0; sys_platform == \"linux\""
] | [] | [] | [] | [] | twine/6.1.0 CPython/3.13.7 | 2026-02-20T19:03:18.678122 | witticism-0.8.1.tar.gz | 265,394 | fb/58/b1e7ec236adeca1b98f3f1e594e29f77b3f2c14893fa2d705a8af1d2a4b8/witticism-0.8.1.tar.gz | source | sdist | null | false | bae3e945864d9a2cd6c7317638dd42e8 | 885090982fc7ae07ef6a620197d46b3e77a6d84b72707e8673bb270902480878 | fb58b1e7ec236adeca1b98f3f1e594e29f77b3f2c14893fa2d705a8af1d2a4b8 | Apache-2.0 | [
"LICENSE"
] | 173 |
2.4 | penguiflow | 2.11.7 | Async-first orchestration library for multi-agent and data pipelines | # PenguiFlow 🐧❄️
<p align="center">
<img src="asset/Penguiflow.png" alt="PenguiFlow logo" width="220">
</p>
<p align="center">
<a href="https://github.com/hurtener/penguiflow/actions/workflows/ci.yml"><img src="https://github.com/hurtener/penguiflow/actions/workflows/ci.yml/badge.svg" alt="CI Status"></a>
<a href="https://github.com/hurtener/penguiflow"><img src="https://img.shields.io/badge/coverage-85%25-brightgreen" alt="Coverage"></a>
<a href="https://nightly.link/hurtener/penguiflow/workflows/benchmarks/main/benchmarks.json.zip"><img src="https://img.shields.io/badge/benchmarks-latest-orange" alt="Benchmarks"></a>
<a href="https://pypi.org/project/penguiflow/"><img src="https://img.shields.io/pypi/v/penguiflow.svg" alt="PyPI version"></a>
<a href="https://github.com/hurtener/penguiflow/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License"></a>
</p>
**Async-first orchestration library for multi-agent and data pipelines**
PenguiFlow is a **lightweight Python library** to orchestrate agent flows.
It provides:
* **Typed, async message passing** (Pydantic v2)
* **Concurrent fan-out / fan-in patterns**
* **Routing & decision points**
* **Retries, timeouts, backpressure**
* **Streaming chunks** (LLM-style token emission with `Context.emit_chunk`)
* **Dynamic loops** (controller nodes)
* **LLM-driven orchestration** (`ReactPlanner` for autonomous multi-step workflows with tool selection, parallel execution, and pause/resume)
* **Auto-seq (opt-in, v1)** — deterministic post-node transitions with `auto_seq_*` events and optional auto-exec per tool.
* **Short-term memory (opt-in)** — per-session conversation continuity for `ReactPlanner` with truncation/rolling-summary strategies, fail-closed isolation by `MemoryKey`, and optional persistence via `state_store` (see `docs/MEMORY_GUIDE.md`).
* **Runtime playbooks** (callable subflows with shared metadata)
* **Per-trace cancellation** (`PenguiFlow.cancel` with `TraceCancelled` surfacing in nodes)
* **Deadlines & budgets** (`Message.deadline_s`, `WM.budget_hops`, and `WM.budget_tokens` guardrails that you can leave unset/`None`)
* **Observability hooks** (`FlowEvent` callbacks for logging, MLflow, or custom metrics sinks)
* **Policy-driven routing** (optional policies steer routers without breaking existing flows)
* **Traceable exceptions** (`FlowError` captures node/trace metadata and optionally emits to Rookery)
* **Distribution hooks (opt-in)** — plug a `StateStore` to persist trace history and a
`MessageBus` to publish floe traffic for remote workers without changing existing flows.
* **Remote calls (opt-in)** — `RemoteNode` bridges the runtime to external agents through a
pluggable `RemoteTransport` interface (A2A-ready) while propagating streaming chunks and
cancellation.
* **A2A server bindings (opt-in)** — expose a PenguiFlow graph via the A2A HTTP+JSON or
gRPC bindings using `penguiflow_a2a.A2AService`, `create_a2a_http_app`, and
`add_a2a_grpc_service`.
* **Observability & ops polish** — remote calls emit structured metrics (latency, payload
sizes, cancel reasons) and the `penguiflow-admin` CLI replays trace history from any
configured `StateStore` for debugging.
* **Built-in CLI** — `penguiflow init` generates VS Code snippets/launch/tasks/settings for planner development (travels with the pip package).
### v2.7 (current)
**New in v2.7:**
- **Interactive Playground** — browser-based development environment with real-time chat, trajectory visualization, and event inspection (`penguiflow dev`)
- **External Tool Integration (ToolNode)** — unified MCP/UTCP/HTTP tool connections with auth, retry, and streaming
- **Short-Term Memory** — per-session conversation continuity with truncation/rolling-summary strategies and multi-tenant isolation
**v2.6 Streaming (included):**
- `JSONLLMClient` protocol supports `stream` and `on_stream_chunk` parameters
- All templates updated to support streaming callbacks
- Improved token-level streaming for real-time responses
**v2.5 CLI Scaffolding (included):**
- Full `penguiflow new` command with 9 project templates
- **Tier 1 (Core):** `minimal`, `react`, `parallel` — foundational patterns
- **Tier 2 (Service):** `rag_server`, `wayfinder`, `analyst` — domain-ready agents
- **Tier 3 (Enterprise):** `enterprise` — multi-tenant with RBAC, quotas, audit trails
- **Additional:** `flow`, `controller` — traditional PenguiFlow patterns
- **Enhancement flags:** `--with-streaming`, `--with-hitl`, `--with-a2a`, `--no-memory`
- See [TEMPLATING_QUICKGUIDE.md](TEMPLATING_QUICKGUIDE.md) for complete documentation
**v2.4 Planner Refinements (included):**
- Explicit `llm_context` vs `tool_context` split; fail-fast on non-JSON `llm_context`
- `ToolContext` protocol for typed tools (`ctx.pause`, `ctx.emit_chunk`, `ctx.tool_context`)
- Explicit join injection for parallel plans; examples in `examples/react_parallel_join`
- Fresh docs: `REACT_PLANNER_INTEGRATION_GUIDE.md`, `docs/MIGRATION_V24.md`
### CLI Quickstart
```bash
# Project scaffolding
uv run penguiflow new my-agent --template react # ReactPlanner template (supports built-in short-term memory)
uv run penguiflow new my-agent --template enterprise # Multi-tenant enterprise setup
uv run penguiflow new my-agent --template parallel --with-streaming # Parallel + SSE
# VS Code configuration
uv run penguiflow init # create .vscode snippets/launch/tasks/settings
uv run penguiflow init --dry-run # preview without writing files
uv run penguiflow init --force # overwrite existing files
# Launch the interactive playground
uv run penguiflow dev # opens browser at http://127.0.0.1:8001
```
### Interactive Playground
PenguiFlow includes a **browser-based development environment** for testing and debugging agents in real-time:
```bash
penguiflow dev --project-root .
```
The playground automatically discovers your agent (orchestrator class or `build_planner` function) and provides:
* **Real-time chat** with streaming responses and LLM token display
* **Trajectory visualization** showing step-by-step execution with thoughts, tool calls, arguments, and results
* **Event inspector** for debugging planner decisions and timing
* **Context editors** for configuring `llm_context` and `tool_context` at runtime
* **Spec validation** for YAML agent definitions with inline error reporting
* **Multi-session support** with isolated state per session
The UI streams events via SSE, displaying:
- `llm_stream_chunk` — real-time LLM token streaming (thinking, action, answer phases)
- `step` — step boundaries with node name, latency, and thought summaries
- `artifact_chunk` — structured artifacts as they're generated
- `done` — final answer with metadata, pause state, and cost breakdown
See `docs/PLAYGROUND_DEV.md` for backend contracts and customization options.
Built on pure `asyncio` (no threads), PenguiFlow is small, predictable, and repo-agnostic.
Product repos only define **their models + node functions** — the core stays dependency-light.
## Gold Standard Scorecard
| Area | Metric | Target | Current |
| --- | --- | --- | --- |
| Hop overhead | µs per hop | ≤ 500 | 398 |
| Streaming order | gaps/dupes | 0 | 0 |
| Cancel leakage | orphan tasks | 0 | 0 |
| Coverage | lines | ≥85% | 86% |
| Deps | count | ≤2 | 2 |
| Import time | ms | ≤220 | 203 |
## 📑 Core Behavior Spec
* [Core Behavior Spec](docs/core_behavior_spec.md) — single-page rundown of ordering,
streaming, cancellation, deadline, and fan-in invariants with pointers to regression
tests.
---
## ✨ Why PenguiFlow?
* **Orchestration is everywhere.** Every Pengui service needs to connect LLMs, retrievers, SQL, or external APIs.
* **Stop rewriting glue.** This library gives you reusable primitives (nodes, flows, contexts) so you can focus on business logic.
* **Typed & safe.** Every hop validated with Pydantic.
* **Lightweight.** Only depends on asyncio + pydantic. No broker, no server, no threads.
---
## 🏗️ Core Concepts
### Message
Every payload is wrapped in a `Message` with headers and metadata.
```python
from pydantic import BaseModel
from penguiflow.types import Message, Headers
class QueryIn(BaseModel):
text: str
msg = Message(
payload=QueryIn(text="unique reach last 30 days"),
headers=Headers(tenant="acme")
)
msg.meta["request_id"] = "abc123"
```
### Node
A node is an async function wrapped with a `Node`.
It validates inputs/outputs (via `ModelRegistry`) and applies `NodePolicy` (timeout, retries, etc.).
```python
from penguiflow.node import Node
class QueryOut(BaseModel):
topic: str
async def triage(msg: QueryIn, ctx) -> QueryOut:
return QueryOut(topic="metrics")
triage_node = Node(triage, name="triage")
```
Node functions must always accept **two positional parameters**: the incoming payload and
the `Context` object. If a node does not use the context, name it `_` or `_ctx`, but keep
the parameter so the runtime can still inject it. Registering the node with
`ModelRegistry` ensures the payload is validated/cast to the expected Pydantic model;
setting `NodePolicy(validate="none")` skips that validation for hot paths.
### Flow
A flow wires nodes together in a directed graph.
Edges are called **Floe**s, and flows have two invisible contexts:
* **OpenSea** 🌊 — ingress (start of the flow)
* **Rookery** 🐧 — egress (end of the flow)
```python
from penguiflow.core import create
flow = create(
triage_node.to(packer_node)
)
```
### Running a Flow
```python
from penguiflow.registry import ModelRegistry
registry = ModelRegistry()
registry.register("triage", QueryIn, QueryOut)
registry.register("packer", QueryOut, PackOut)
flow.run(registry=registry)
# Single caller
await flow.emit(msg) # emit into OpenSea
out = await flow.fetch() # fetch from Rookery
print(out.payload) # PackOut(...)
# If you reuse a single running flow across concurrent callers,
# use trace-scoped roundtrips to avoid cross-consuming results.
trace_id = "..." # your request/session id
await flow.emit(msg, trace_id=trace_id)
out = await flow.fetch(trace_id=trace_id)
await flow.stop()
```
> **Opt-in distribution:** pass `state_store=` and/or `message_bus=` when calling
> `penguiflow.core.create(...)` to persist trace history and publish floe traffic
> without changing node logic.
---
## 🧭 Design Principles
1. **Async-only (`asyncio`).**
* Flows are orchestrators, mostly I/O-bound.
* Async tasks are cheap, predictable, and cancellable.
* Heavy CPU work should be offloaded inside a node (process pool, Ray, etc.), not in PenguiFlow itself.
* v1 intentionally stays in-process; scaling out or persisting state will arrive with future pluggable backends.
2. **Typed contracts.**
* In/out models per node are defined with Pydantic.
* Validated at runtime via cached `TypeAdapter`s.
* `flow.run(registry=...)` verifies every validating node is registered so misconfigurations fail fast.
3. **Reliability first.**
* Timeouts, retries with backoff, backpressure on queues.
* Nodes run inside error boundaries.
4. **Minimal dependencies.**
* Only asyncio + pydantic.
* No broker, no server. Everything in-process.
5. **Repo-agnostic.**
* Product repos declare their models + node funcs, register them, and run.
* No product-specific code in the library.
---
## 📦 Installation
```bash
pip install -e ./penguiflow
```
Requires **Python 3.11+**.
---
## 🛠️ Key capabilities
### Streaming & incremental delivery
`Context.emit_chunk` (and `PenguiFlow.emit_chunk`) provide token-level streaming without
sacrificing backpressure or ordering guarantees. The helper wraps the payload in a
`StreamChunk`, mirrors routing metadata from the parent message, and automatically
increments per-stream sequence numbers. See `tests/test_streaming.py` and
`examples/streaming_llm/` for an end-to-end walk-through.
### Remote orchestration
Phase 2 introduces `RemoteNode` and the `RemoteTransport` protocol so flows can delegate
work to remote agents (e.g., the A2A JSON-RPC/SSE ecosystem) without changing existing
nodes. The helper records remote bindings via the `StateStore`, mirrors streaming
partials back into the graph, and propagates per-trace cancellation to remote tasks via
`RemoteTransport.cancel`. See `tests/test_remote.py` for reference in-memory transports.
### Exposing a flow over A2A
Install the optional extras to expose PenguiFlow via A2A:
```bash
pip install "penguiflow[a2a-server]" # HTTP+JSON + JSON-RPC
pip install "penguiflow[a2a-grpc]" # gRPC binding
pip install "penguiflow[a2a-client]" # RemoteNode HTTP+JSON transport
```
Create the A2A service and mount the HTTP+JSON routes:
```python
from penguiflow import Message, Node, create
from penguiflow_a2a import A2AConfig, A2AService, create_a2a_http_app
from penguiflow_a2a.models import AgentCapabilities, AgentCard, AgentInterface, AgentSkill
async def orchestrate(message: Message, ctx):
await ctx.emit_chunk(parent=message, text="thinking...")
return {"result": "done"}
node = Node(orchestrate, name="main")
flow = create(node.to())
card = AgentCard(
protocol_versions=["0.3"],
name="Main Agent",
description="Primary entrypoint for orchestration",
supported_interfaces=[
AgentInterface(url="https://agent.example/a2a", protocol_binding="HTTP+JSON")
],
version="2.1.0",
capabilities=AgentCapabilities(
streaming=True,
push_notifications=False,
extended_agent_card=False,
state_transition_history=False,
),
default_input_modes=["application/a2a+json", "application/json"],
default_output_modes=["application/a2a+json", "application/json"],
skills=[
AgentSkill(
id="orchestrate",
name="orchestrate",
description="Handles orchestration",
tags=["orchestrate"],
)
],
)
service = A2AService(
flow,
agent_card=card,
config=A2AConfig(agent_url="https://agent.example/a2a"),
)
app = create_a2a_http_app(service)
```
To call a remote A2A agent from a flow, use the built-in HTTP+JSON transport:
```python
from penguiflow import RemoteNode
from penguiflow_a2a import A2AHttpTransport
transport = A2AHttpTransport()
node = RemoteNode(
transport=transport,
skill="orchestrate",
agent_url="https://agent.example/a2a",
name="remote-orchestrate",
streaming=True,
)
```
To call a remote A2A agent from the planner (ReactPlanner), expose the remote agent as a
regular tool using `A2AAgentToolset`:
```python
from pydantic import BaseModel
from penguiflow.planner import ReactPlanner
from penguiflow_a2a import A2AAgentToolset, A2AHttpTransport
class EchoArgs(BaseModel):
text: str
class EchoOut(BaseModel):
echo: str
toolset = A2AAgentToolset(
agent_url="https://agent.example/a2a",
transport=A2AHttpTransport(),
)
remote_echo = toolset.tool(
name="remote_echo",
skill="echo",
args_model=EchoArgs,
out_model=EchoOut,
desc="Echo via remote A2A agent",
streaming=True,
)
planner = ReactPlanner(llm="gpt-4o-mini", catalog=[remote_echo])
result = await planner.run("echo hello")
```
See `docs/tools/a2a-agent-tools.md` for details.
The generated FastAPI app implements canonical A2A HTTP+JSON endpoints such as
`/.well-known/agent-card.json`, `POST /message:send`, `POST /message:stream`, and the
`/tasks/{task_id}` lifecycle routes. JSON-RPC is available at `POST /rpc`.
To expose the same service over gRPC, attach the binding to a `grpc.aio.server` and see
`examples/a2a_grpc_server/flow.py` for a full end-to-end example.
### Reliability & guardrails
PenguiFlow enforces reliability boundaries out of the box:
* **Per-trace cancellation** (`PenguiFlow.cancel(trace_id)`) unwinds a single run while
other traces keep executing. Worker tasks observe `TraceCancelled` and clean up
resources; `tests/test_cancel.py` covers the behaviour.
* **Deadlines & budgets** let you keep loops honest. `Message.deadline_s` guards
wall-clock execution, while controller payloads (`WM`) track hop and token budgets.
Exhaustion short-circuits into terminal `FinalAnswer` messages as demonstrated in
`tests/test_budgets.py` and `examples/controller_multihop/`.
* **Retries & timeouts** live in `NodePolicy`. Exponential backoff, timeout enforcement,
and structured retry events are exercised heavily in the core test suite.
### Metadata & observability
Every `Message` carries a mutable `meta` dictionary so nodes can propagate debugging
breadcrumbs, billing information, or routing hints without touching the payload. The
runtime clones metadata during streaming and playbook calls (`tests/test_metadata.py`).
Structured runtime events surface through `FlowEvent` objects; attach middlewares for
custom logging or metrics ingestion (`examples/mlflow_metrics/`).
### Routing & dynamic policies
Branching flows stay flexible thanks to routers and optional policies. The
`predicate_router` and `union_router` helpers can consult a `RoutingPolicy` at runtime to
override or drop successors, while `DictRoutingPolicy` provides a config-driven
implementation ready for JSON/YAML/env inputs (`tests/test_routing_policy.py`,
`examples/routing_policy/`).
### Traceable exceptions
When retries are exhausted or timeouts fire, PenguiFlow wraps the failure in a
`FlowError` that preserves the trace id, node metadata, and a stable error code.
Opt into `emit_errors_to_rookery=True` to receive these objects directly from
`flow.fetch()`—see `tests/test_errors.py` and `examples/traceable_errors/` for usage.
### FlowTestKit
The new `penguiflow.testkit` module keeps unit tests tiny:
* `await testkit.run_one(flow, message)` boots a flow, emits a message, captures runtime
events, and returns the first Rookery payload.
* `testkit.assert_node_sequence(trace_id, [...])` asserts the order in which nodes ran.
* `testkit.simulate_error(...)` builds coroutine helpers that fail a configurable number
of times—perfect for retry scenarios.
The harness is covered by `tests/test_testkit.py` and demonstrated in
`examples/testkit_demo/`.
### External Tool Integration (ToolNode)
Connect ReactPlanner to external services via **MCP** (Model Context Protocol), **UTCP**, or **HTTP** with unified authentication and resilience:
```python
from penguiflow.tools import ToolNode, ExternalToolConfig, TransportType, AuthType
config = ExternalToolConfig(
name="github",
transport=TransportType.MCP,
connection="npx -y @modelcontextprotocol/server-github",
auth_type=AuthType.OAUTH2_USER,
timeout_s=30,
max_concurrency=10,
)
tool_node = ToolNode(config=config, registry=registry)
await tool_node.connect()
# Discovered tools are namespaced: github.create_issue, github.search_repos, etc.
specs = tool_node.get_tool_specs()
# Add external tools to planner catalog alongside local tools
planner = ReactPlanner(llm="gpt-4o", catalog=specs + local_tools)
```
**Supported transports:**
- **MCP** — FastMCP servers (stdio or HTTP)
- **UTCP** — Universal Tool Calling Protocol endpoints
- **HTTP** — REST APIs with JSON schema discovery
**Authentication types:**
- `NONE` — No authentication
- `API_KEY` — Header injection (configurable header name)
- `BEARER` — Authorization header with Bearer token
- `OAUTH2_USER` — User-level OAuth with HITL pause/resume for consent
**Built-in resilience:**
- Exponential backoff retries with tenacity (configurable min/max)
- Timeout protection via `asyncio.timeout()`
- Semaphore-based concurrency limiting (default 10 concurrent calls)
- Smart retry classification: 429/5xx = retry, 4xx = no retry
- Event loop awareness for automatic reconnection
**Error hierarchy:**
- `ToolNodeError` (base) with `is_retryable` classification
- `ToolAuthError` (401, 403), `ToolServerError` (5xx), `ToolRateLimitError` (429)
- `ToolClientError` (4xx), `ToolConnectionError`, `ToolTimeoutError`
CLI helpers for testing tool connections:
```bash
penguiflow tools list # List available presets
penguiflow tools connect github --discover # Test connection and discover tools
```
### React Planner - LLM-Driven Orchestration
Build autonomous agents that select and execute tools dynamically using the ReAct (Reasoning + Acting) pattern:
```python
from penguiflow import ReactPlanner, tool, build_catalog
@tool(desc="Search documentation")
async def search_docs(args: Query, ctx) -> Documents:
return Documents(results=await search(args.text))
@tool(desc="Summarize results")
async def summarize(args: Documents, ctx) -> Summary:
return Summary(text=await llm_summarize(args.results))
planner = ReactPlanner(
llm="gpt-4",
catalog=build_catalog([search_docs, summarize], registry),
max_iters=10
)
result = await planner.run("Explain PenguiFlow routing")
print(result.payload) # LLM orchestrated search → summarize automatically
```
**Key capabilities:**
* **Autonomous tool selection** — LLM decides which tools to call and in what order based on your query
* **Type-safe execution** — All tool inputs/outputs validated with Pydantic, JSON schemas auto-generated from models
* **Parallel execution** — LLM can fan out to multiple tools concurrently with automatic result joining
* **Pause/resume workflows** — Add approval gates with `await ctx.pause()`, resume later with user input
* **Adaptive replanning** — Tool failures feed structured error suggestions back to LLM for recovery
* **Constraint enforcement** — Set hop budgets, deadlines, and token limits to prevent runaway execution
* **Planning hints** — Guide LLM behavior with ordering preferences, parallel groups, and tool filters
* **Policy-based tool filtering** — Restrict catalog visibility per tenant, role, or safety requirement with `ToolPolicy`
### Policy-Based Tool Filtering
Apply runtime guardrails to the planner's tool catalog using `ToolPolicy`. This
lets you tailor availability by tenant tier, user permissions, or safety
tags without modifying the underlying nodes.
```python
from penguiflow.planner import ReactPlanner, ToolPolicy
policy_free = ToolPolicy(allowed_tools={"search_public", "summarise"})
policy_premium = ToolPolicy(denied_tools={"delete_user"}, require_tags={"safe"})
planner_free = ReactPlanner(..., tool_policy=policy_free)
planner_premium = ReactPlanner(..., tool_policy=policy_premium)
print(planner_free._spec_by_name.keys()) # {'search_public', 'summarise'}
print(planner_premium._spec_by_name.keys()) # filtered catalog
```
Policies evaluate in the following order:
1. `denied_tools`
2. `allowed_tools` (if provided)
3. `require_tags` (must be present on the tool)
Any tool failing these checks is removed before prompt construction, and the
planner logs the filtered names for observability. Combine this with stored
tenant settings or role metadata to enforce enterprise-grade boundaries.
### Reflection Loop (Quality Assurance)
PenguiFlow's ReactPlanner now includes an optional **reflection loop** that critiques candidate answers before finishing. This
prevents the LLM from prematurely declaring success when critical requirements remain unsatisfied.
Enable the loop with a `ReflectionConfig`:
```python
from penguiflow.planner import ReactPlanner, ReflectionConfig, ReflectionCriteria
planner = ReactPlanner(
llm="gpt-4",
catalog=build_catalog([search_docs, summarize], registry),
reflection_config=ReflectionConfig(
enabled=True,
criteria=ReflectionCriteria(
completeness="Addresses all aspects of the user's query",
accuracy="Grounds statements in verified observations",
clarity="Explains reasoning clearly",
),
quality_threshold=0.85,
max_revisions=2,
use_separate_llm=True,
),
reflection_llm="gpt-4o-mini",
)
result = await planner.run("Explain how PenguiFlow handles errors in parallel execution")
print(result.metadata["reflection"]) # => {'score': 0.92, 'revisions': 1, 'passed': True, 'feedback': '...'}
```
**Benefits:**
* ✅ Prevents incomplete answers — planner loops until the critique score meets your threshold or max revisions are reached
* ✅ Observable — every critique emits a `PlannerEvent` with score, pass flag, and truncated feedback
* ✅ Cost-aware — reuse the main LLM or provide a cheaper `reflection_llm` for critiques
* ✅ Budget-safe — revisions respect hop and deadline budgets; no runaway loops
### Cost Tracking
ReactPlanner automatically records LLM spend for every planning session. Costs are split across planner actions, reflection calls, and trajectory summarisation so you can monitor budgets in production.
```python
from penguiflow.planner import ReactPlanner, ReflectionConfig
planner = ReactPlanner(
llm="gpt-4o",
catalog=build_catalog([search_docs, summarize], registry),
reflection_config=ReflectionConfig(enabled=True, max_revisions=2),
reflection_llm="gpt-4o-mini", # cheaper critique model
)
result = await planner.run("Analyse onboarding friction across regions")
cost = result.metadata["cost"]
print(f"Total cost: ${cost['total_cost_usd']:.4f}")
print(f"Planner calls: {cost['main_llm_calls']}")
print(f"Reflections: {cost['reflection_llm_calls']}")
print(f"Summaries: {cost['summarizer_llm_calls']}")
```
Hook into planner events to emit metrics or alerts when sessions exceed your budget:
```python
from penguiflow.planner.react import PlannerEvent
def track_costs(event: PlannerEvent) -> None:
if event.event_type != "finish":
return
session_cost = event.extra.get("cost", {}).get("total_cost_usd", 0.0)
if session_cost > 0.10:
logger.warning("high_cost_session", extra={"cost_usd": session_cost})
planner = ReactPlanner(
llm="gpt-4o",
catalog=build_catalog([search_docs, summarize], registry),
event_callback=track_costs,
)
```
### Short-Term Memory
Enable conversation continuity across turns with opt-in session memory. Memory is isolated per session using composite `MemoryKey` (tenant + user + session):
```python
from penguiflow.planner import ReactPlanner, ShortTermMemoryConfig, MemoryBudget, MemoryKey
planner = ReactPlanner(
llm="gpt-4o",
catalog=catalog,
short_term_memory=ShortTermMemoryConfig(
strategy="rolling_summary", # or "truncation", "none"
budget=MemoryBudget(
full_zone_turns=5, # Recent turns kept in full
summary_max_tokens=1000, # Max summary size
total_max_tokens=8000, # Overall cap
overflow_policy="truncate_oldest", # or "truncate_summary", "error"
),
),
)
# Session-scoped memory with tenant isolation
key = MemoryKey(tenant_id="acme", user_id="user123", session_id="sess-abc")
result = await planner.run("What did we discuss earlier?", memory_key=key)
```
**Strategies:**
- **`truncation`** — Keep last N turns only (deterministic, low-latency, cost-effective)
- **`rolling_summary`** — Compress older turns into summaries via background summarization (maintains long context)
- **`none`** — Stateless operation (default)
**Safety features:**
- **Fail-closed isolation** — `require_explicit_key=True` prevents accidental cross-session leakage
- **Background summarization** — Non-blocking; doesn't delay responses
- **Graceful degradation** — Summarizer failures fall back to truncation mode
- **Health states** — `HEALTHY`, `RETRY`, `DEGRADED`, `RECOVERING` for observability
**Memory context injection:**
```python
# Memory is injected as a separate system message with safety preamble
{
"conversation_memory": {
"recent_turns": [...], # Full turns in the "full zone"
"pending_turns": [...], # Turns awaiting summarization
"summary": "..." # Compressed history
}
}
```
**Persistence:**
```python
# Persist across process restarts via duck-typed store
await memory.persist(state_store, key.composite())
await memory.hydrate(state_store, key.composite())
```
**Observability callbacks:**
```python
ShortTermMemoryConfig(
on_turn_added=lambda turn: log(turn),
on_summary_updated=lambda summary: log(summary),
on_health_changed=lambda old, new: alert(old, new),
)
```
See `docs/MEMORY_GUIDE.md` for complete configuration and `examples/memory_basic/` through `examples/memory_custom/` for usage patterns.
### Streaming Planner Responses
ReactPlanner tools can emit **streaming chunks** mid-execution. Each call to
`ctx.emit_chunk` is persisted on the trajectory and surfaced through
`PlannerEvent(event_type="stream_chunk")`, so downstream UIs can render partial
progress as soon as it is available.
```python
from pydantic import BaseModel
from penguiflow.catalog import build_catalog, tool
from penguiflow.planner import PlannerEvent, ReactPlanner
from penguiflow.registry import ModelRegistry
class Query(BaseModel):
question: str
class Answer(BaseModel):
answer: str
@tool(desc="Stream answer token-by-token")
async def stream_answer(args: Query, ctx) -> Answer:
tokens = ["PenguiFlow", "is", "a", "typed", "async", "planner"]
for index, token in enumerate(tokens):
await ctx.emit_chunk("answer_stream", index, f"{token} ", done=False)
await ctx.emit_chunk("answer_stream", len(tokens), "", done=True)
return Answer(answer=" ".join(tokens))
def handle_stream(event: PlannerEvent) -> None:
if event.event_type == "stream_chunk":
print(event.extra["text"], end="", flush=True)
if event.extra["done"]:
print()
registry = ModelRegistry()
registry.register("stream_answer", Query, Answer)
planner = ReactPlanner(
llm="gpt-4o-mini",
catalog=build_catalog([stream_answer], registry),
event_callback=handle_stream,
)
result = await planner.run("Tell me about PenguiFlow")
print(result.metadata["steps"][0]["streams"]["answer_stream"]) # structured chunks
```
**Model support:**
* Install `penguiflow[planner]` for LiteLLM integration (100+ models: OpenAI, Anthropic, Azure, etc.)
* Or inject a custom `llm_client` for deterministic/offline testing
**Examples:**
* `examples/react_minimal/` — Basic sequential flow with stub LLM
* `examples/react_parallel/` — Parallel shard fan-out with join node
* `examples/react_pause_resume/` — Approval workflow with planning hints
* `examples/react_replan/` — Adaptive recovery from tool failures
See **manual.md Section 19** for complete documentation.
## 🧭 Repo Structure
penguiflow/
__init__.py
core.py # runtime orchestrator, retries, controller helpers, playbooks
errors.py # FlowError / FlowErrorCode definitions
node.py
types.py
registry.py
patterns.py
middlewares.py
viz.py
README.md
pyproject.toml # build metadata
tests/ # pytest suite
examples/ # runnable flows (fan-out, routing, controller, playbooks)
---
## 🚀 Quickstart Example
```python
from pydantic import BaseModel
from penguiflow import Headers, Message, ModelRegistry, Node, NodePolicy, create
class TriageIn(BaseModel):
text: str
class TriageOut(BaseModel):
text: str
topic: str
class RetrieveOut(BaseModel):
topic: str
docs: list[str]
class PackOut(BaseModel):
prompt: str
async def triage(msg: TriageIn, ctx) -> TriageOut:
topic = "metrics" if "metric" in msg.text else "general"
return TriageOut(text=msg.text, topic=topic)
async def retrieve(msg: TriageOut, ctx) -> RetrieveOut:
docs = [f"doc_{i}_{msg.topic}" for i in range(2)]
return RetrieveOut(topic=msg.topic, docs=docs)
async def pack(msg: RetrieveOut, ctx) -> PackOut:
prompt = f"[{msg.topic}] summarize {len(msg.docs)} docs"
return PackOut(prompt=prompt)
triage_node = Node(triage, name="triage", policy=NodePolicy(validate="both"))
retrieve_node = Node(retrieve, name="retrieve", policy=NodePolicy(validate="both"))
pack_node = Node(pack, name="pack", policy=NodePolicy(validate="both"))
registry = ModelRegistry()
registry.register("triage", TriageIn, TriageOut)
registry.register("retrieve", TriageOut, RetrieveOut)
registry.register("pack", RetrieveOut, PackOut)
flow = create(
triage_node.to(retrieve_node),
retrieve_node.to(pack_node),
)
flow.run(registry=registry)
message = Message(
payload=TriageIn(text="show marketing metrics"),
headers=Headers(tenant="acme"),
)
await flow.emit(message)
out = await flow.fetch()
print(out.prompt) # PackOut(prompt='[metrics] summarize 2 docs')
await flow.stop()
```
### Patterns Toolkit
PenguiFlow ships a handful of **composable patterns** to keep orchestration code tidy
without forcing you into a one-size-fits-all DSL. Each helper is opt-in and can be
stitched directly into a flow adjacency list:
- `map_concurrent(items, worker, max_concurrency=8)` — fan a single message out into
many in-memory tasks (e.g., batch document enrichment) while respecting a semaphore.
- `predicate_router(name, predicate, policy=None)` — route messages to successor nodes
based on simple boolean functions over payload or headers, optionally consulting a
runtime `policy` to override or filter the computed targets. Perfect for guardrails or
conditional tool invocation without rebuilding the flow.
- `union_router(name, discriminated_model)` — accept a Pydantic discriminated union and
forward each variant to the matching typed successor node. Keeps type-safety even when
multiple schema branches exist.
- `join_k(name, k)` — aggregate `k` messages per `trace_id` before resuming downstream
work. Useful for fan-out/fan-in batching, map-reduce style summarization, or consensus.
- `DictRoutingPolicy(mapping, key_getter=None)` — load routing overrides from
configuration and pair it with the router helpers via `policy=...` to switch routing at
runtime without modifying the flow graph.
All helpers are regular `Node` instances under the hood, so they inherit retries,
timeouts, and validation just like hand-written nodes.
### Streaming Responses
PenguiFlow now supports **LLM-style streaming** with the `StreamChunk` model. Each
chunk carries `stream_id`, `seq`, `text`, optional `meta`, and a `done` flag. Use
`Context.emit_chunk(parent=message, text=..., done=...)` inside a node (or the
convenience wrapper `await flow.emit_chunk(...)` from outside a node) to push
chunks downstream without manually crafting `Message` envelopes:
```python
await ctx.emit_chunk(parent=msg, text=token, done=done)
```
- Sequence numbers auto-increment per `stream_id` (defaults to the parent trace).
- Backpressure is preserved; if the downstream queue is full the helper awaits just
like `Context.emit`.
- When `done=True`, the sequence counter resets so a new stream can reuse the same id.
Pair the producer with a sink node that consumes `StreamChunk` payloads and assembles
the final result when `done` is observed. See `examples/streaming_llm/` for a complete
mock LLM → SSE pipeline. For presentation layers, utilities like
`format_sse_event(chunk)` and `chunk_to_ws_json(chunk)` (both exported from the
package) will convert a `StreamChunk` into SSE-compatible text or WebSocket JSON payloads
without boilerplate.
### Dynamic Controller Loops
Long-running agents often need to **think, plan, and act over multiple hops**. PenguiFlow
models this with a controller node that loops on itself:
1. Define a controller `Node` with `allow_cycle=True` and wire `controller.to(controller)`.
2. Emit a `Message` whose payload is a `WM` (working memory). PenguiFlow increments the
`hops` counter automatically and enforces `budget_hops` + `deadline_s` so controllers
cannot loop forever.
3. The controller can attach intermediate `Thought` artifacts or emit `PlanStep`s for
transparency/debugging. When it is ready to finish, it returns a `FinalAnswer` which
is immediately forwarded to Rookery.
Deadlines and hop budgets turn into automated `FinalAnswer` error messages, making it
easy to surface guardrails to downstream consumers.
---
### Playbooks & Subflows
Sometimes a controller or router needs to execute a **mini flow** — for example,
retrieval → rerank → compress — without polluting the global topology.
`Context.call_playbook` spawns a brand-new `PenguiFlow` on demand and wires it into
the parent message context:
- Trace IDs and headers are reused so observability stays intact.
- The helper respects optional timeouts, mirrors cancellation to the subflow, and always
stops it (even on cancel).
- The first payload emitted to the playbook's Rookery is returned to the caller,
allowing you to treat subflows as normal async functions.
```python
from penguiflow.types import Message
async def controller(msg: Message, ctx) -> Message:
playbook_result = await ctx.call_playbook(build_retrieval_playbook, msg)
return msg.model_copy(update={"payload": playbook_result})
```
Playbooks are ideal for deploying frequently reused toolchains while keeping the main
flow focused on high-level orchestration logic.
---
### Visualization
Need a quick view of the flow topology? Call `flow_to_mermaid(flow)` to render the graph
as a Mermaid diagram ready for Markdown or docs tools, or `flow_to_dot(flow)` for a
Graphviz-friendly definition. Both outputs annotate controller loops and the synthetic
OpenSea/Rookery boundaries so you can spot ingress/egress paths at a glance:
```python
from penguiflow import flow_to_dot, flow_to_mermaid
print(flow_to_mermaid(flow, direction="LR"))
print(flow_to_dot(flow, rankdir="LR"))
```
See `examples/visualizer/` for a runnable script that exports Markdown and DOT files for
docs or diagramming pipelines.
---
## 🛡️ Reliability & Observability
* **NodePolicy**: set validation scope plus per-node timeout, retries, and backoff curves.
* **Per-trace metrics**: cancellation events include `trace_pending`, `trace_inflight`,
`q_depth_in`, `q_depth_out`, and node fan-out counts for richer observability.
* **Structured `FlowEvent`s**: every node event carries `{ts, trace_id, node_name, event,
latency_ms, q_depth_in, q_depth_out, attempt}` plus a mutable `extra` map for custom
annotations.
* **Remote call telemetry**: `RemoteNode` executions emit extra metrics (latency, request
and response bytes, context/task identifiers, cancel reasons) so remote hops can be
traced end-to-end.
* **Middleware hooks**: subscribe observers (e.g., MLflow) to the structured `FlowEvent`
stream. See `examples/mlflow_metrics/` for an MLflow integration and
`examples/reliability_middleware/` for a concrete timeout + retry walkthrough.
* **`penguiflow-admin` CLI**: inspect or replay stored trace history from any configured
`StateStore` (`penguiflow-admin history <trace>` or `penguiflow-admin replay <trace>`)
when debugging distributed runs.
---
## ⚠️ Current Constraints
- **In-process runtime**: there is no built-in distribution layer yet. Long-running CPU work should be delegated to your own pools or services.
- **Registry-driven typing**: nodes default to validation. Provide a `ModelRegistry` when calling `flow.run(...)` or set `validate="none"` explicitly for untyped hops.
- **Observability**: structured `FlowEvent` callbacks and the `penguiflow-admin` CLI power
local debugging; integrations with third-party stacks (OTel, Prometheus, Datadog) remain
DIY. See the MLflow middleware example for a lightweight pattern.
- **Roadmap**: follow-up releases focus on optional distributed backends, deeper observability integrations, and additional playbook patterns. Contributions and proposals are welcome!
---
## 📊 Benchmarks
Lightweight benchmarks live under `benchmarks/`. Run them via `uv run python benchmarks/<name>.py`
to capture baselines for fan-out throughput, retry/timeout overhead, and controller
playbook la | text/markdown | PenguiFlow Team | null | null | null | MIT License
Copyright (c) 2025 hurtener
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
| null | [] | [] | null | null | >=3.11 | [] | [] | [] | [
"pydantic>=2.6",
"click>=8.1",
"pyyaml>=6.0",
"fastapi>=0.118",
"uvicorn>=0.32",
"databricks-mcp>=0.6.0",
"mypy>=1.8; extra == \"dev\"",
"pytest>=7.4; extra == \"dev\"",
"pytest-asyncio>=0.23; extra == \"dev\"",
"pytest-cov>=4.0; extra == \"dev\"",
"coverage[toml]>=7.0; extra == \"dev\"",
"hypothesis>=6.103; extra == \"dev\"",
"ruff>=0.2; extra == \"dev\"",
"ag-ui-protocol>=0.0.42; extra == \"dev\"",
"jsonschema>=4.23; extra == \"dev\"",
"fastapi>=0.118; extra == \"dev\"",
"httpx>=0.27; extra == \"dev\"",
"jinja2>=3.1; extra == \"dev\"",
"pyyaml>=6.0; extra == \"dev\"",
"uvicorn>=0.32; extra == \"dev\"",
"tenacity>=9.0.0; extra == \"dev\"",
"aiohttp>=3.9.0; extra == \"dev\"",
"grpcio>=1.70.0; extra == \"dev\"",
"grpcio-status>=1.70.0; extra == \"dev\"",
"grpcio-tools>=1.70.0; extra == \"dev\"",
"googleapis-common-protos>=1.66.0; extra == \"dev\"",
"protobuf>=5.26.0; extra == \"dev\"",
"openai>=2.0.0; extra == \"dev\"",
"anthropic>=0.75.0; extra == \"dev\"",
"google-genai>=1.57.0; extra == \"dev\"",
"boto3>=1.42.0; extra == \"dev\"",
"ag-ui-protocol>=0.0.42; extra == \"cli\"",
"jinja2>=3.1; extra == \"cli\"",
"fastapi>=0.118; extra == \"cli\"",
"uvicorn>=0.32; extra == \"cli\"",
"fastapi>=0.118; extra == \"a2a-server\"",
"grpcio>=1.70.0; extra == \"a2a-grpc\"",
"grpcio-status>=1.70.0; extra == \"a2a-grpc\"",
"grpcio-tools>=1.70.0; extra == \"a2a-grpc\"",
"googleapis-common-protos>=1.66.0; extra == \"a2a-grpc\"",
"protobuf>=5.26.0; extra == \"a2a-grpc\"",
"httpx>=0.27; extra == \"a2a-client\"",
"litellm>=1.77.3; extra == \"planner\"",
"dspy>=3.0.3; extra == \"planner\"",
"fastmcp>=2.13.0; extra == \"planner\"",
"utcp>=1.1.0; extra == \"planner\"",
"utcp-http>=1.0.0; extra == \"planner\"",
"tenacity>=9.0.0; extra == \"planner\"",
"aiohttp>=3.9.0; extra == \"planner\"",
"jsonschema>=4.23; extra == \"planner\"",
"openai>=2.0.0; extra == \"llm\"",
"anthropic>=0.75.0; extra == \"llm\"",
"google-genai>=1.57.0; extra == \"llm\"",
"boto3>=1.42.0; extra == \"llm\"",
"databricks-sdk>=0.77.0; extra == \"llm\"",
"utcp-cli>=1.0.0; extra == \"tools-cli\"",
"utcp-websocket>=1.0.0; extra == \"tools-websocket\""
] | [] | [] | [] | [
"Homepage, https://github.com/penguiflow/penguiflow"
] | twine/6.1.0 CPython/3.13.7 | 2026-02-20T19:02:47.055633 | penguiflow-2.11.7.tar.gz | 4,473,112 | 02/d9/2d4d69a1a9ce80f93372263fc68ae83bfb0230485a4d61def9cbc86654f7/penguiflow-2.11.7.tar.gz | source | sdist | null | false | 81309d1f642b730f30d0b17567713709 | 7441ef94816a7d0f10a0767661a1ff57604085c98e24cb986e3ee75902de62eb | 02d92d4d69a1a9ce80f93372263fc68ae83bfb0230485a4d61def9cbc86654f7 | null | [
"LICENSE"
] | 208 |
2.4 | majordomo-llm | 0.3.2 | Unified Python interface for multiple LLM providers with cost tracking | # majordomo-llm
[](https://badge.fury.io/py/majordomo-llm)
[](https://www.python.org/downloads/)
[](https://opensource.org/licenses/MIT)
[](https://superset-studio.github.io/majordomo-llm/)
A unified Python interface for multiple LLM providers with automatic cost tracking, retry logic, and structured output support.
## Features
- **Unified API** - Same interface for OpenAI, Anthropic (Claude), Google Gemini, DeepSeek, and Cohere
- **Streaming** - Real-time token-by-token output via `get_response_stream()` with async iteration
- **Cost Tracking** - Automatic calculation of input/output token costs per request
- **Structured Outputs** - Native support for Pydantic models as response schemas
- **Automatic Retries** - Built-in exponential backoff retry logic using tenacity
- **Automatic Fallback** - Cascade across providers with `LLMCascade` for resilience
- **Request Logging** - Optional async logging to PostgreSQL/MySQL/SQLite with S3 or local file storage for request/response bodies
- **API Key Tracking** - Log hashed API keys and optional aliases for usage attribution
- **Async First** - Fully async/await compatible for high-performance applications
- **Type Safe** - Complete type annotations and `py.typed` marker for IDE support
## Installation
```bash
pip install majordomo-llm
```
Or with [uv](https://github.com/astral-sh/uv):
```bash
uv add majordomo-llm
```
### Optional: Request Logging
To enable request logging to PostgreSQL, MySQL, or S3:
```bash
pip install majordomo-llm[logging]
```
## Quick Start
### Basic Text Response
```python
import asyncio
from majordomo_llm import get_llm_instance
async def main():
# Create an LLM instance
llm = get_llm_instance("anthropic", "claude-sonnet-4-20250514")
# Get a response
response = await llm.get_response(
user_prompt="What is the capital of France?",
system_prompt="You are a helpful geography assistant.",
)
print(response.content)
print(f"Tokens: {response.input_tokens} in, {response.output_tokens} out")
print(f"Cost: ${response.total_cost:.6f}")
asyncio.run(main())
```
### JSON Response
```python
response = await llm.get_json_response(
user_prompt="List the top 3 largest countries by area as JSON",
system_prompt="Respond with valid JSON only.",
)
# response.content is a parsed Python dict
for country in response.content["countries"]:
print(country["name"])
```
### Streaming
```python
stream = await llm.get_response_stream(
user_prompt="Explain quantum computing",
system_prompt="Be concise.",
)
async for chunk in stream:
print(chunk, end="", flush=True)
print(f"\nCost: ${stream.usage.total_cost:.6f}")
# Or collect the full response:
stream = await llm.get_response_stream("Summarize this document...")
response = await stream.collect() # Returns an LLMResponse
print(response.content)
```
### Structured Output with Pydantic
```python
from pydantic import BaseModel
class CountryInfo(BaseModel):
name: str
capital: str
population: int
area_km2: float
response = await llm.get_structured_json_response(
response_model=CountryInfo,
user_prompt="Give me information about Japan",
)
# response.content is a validated CountryInfo instance
country = response.content
print(f"{country.name}: {country.capital}, pop. {country.population:,}")
```
## Configuration
### Environment Variables
Set API keys for the providers you want to use:
```bash
# OpenAI
export OPENAI_API_KEY="sk-..."
# Anthropic (Claude)
export ANTHROPIC_API_KEY="sk-ant-..."
# Google Gemini
export GEMINI_API_KEY="..."
# DeepSeek
export DEEPSEEK_API_KEY="sk-..."
# Cohere
export CO_API_KEY="..."
```
For local development, copy `.env.example` to `.env` and fill in your keys. Never commit `.env`.
### Available Models
#### OpenAI
- `gpt-5`, `gpt-5-mini`, `gpt-5-nano`
- `gpt-4o`, `gpt-4.1`, `gpt-4.1-mini`, `gpt-4.1-nano`
#### Anthropic
- `claude-sonnet-4-5-20250929`, `claude-opus-4-1-20250805`
- `claude-opus-4-20250514`, `claude-sonnet-4-20250514`
- `claude-3-7-sonnet-latest`, `claude-3-5-haiku-latest`
#### Gemini
- `gemini-2.5-flash`, `gemini-2.5-flash-lite`
- `gemini-2.0-flash`, `gemini-2.0-flash-lite`
#### DeepSeek
- `deepseek-chat`, `deepseek-reasoner`
#### Cohere
- `command-a-03-2025`, `command-r-plus-08-2024`
- `command-r-08-2024`, `command-r7b-12-2024`
## API Reference
### Factory Functions
#### `get_llm_instance(provider: str, model: str) -> LLM`
Create an LLM instance for the specified provider and model.
```python
from majordomo_llm import get_llm_instance
llm = get_llm_instance("openai", "gpt-4o")
```
### LLM Methods
All LLM instances support these async methods:
#### `get_response(user_prompt, system_prompt=None, temperature=0.3, top_p=1.0) -> LLMResponse`
Get a plain text response.
#### `get_json_response(user_prompt, system_prompt=None, temperature=0.3, top_p=1.0) -> LLMJSONResponse`
Get a JSON response (automatically parsed).
#### `get_response_stream(user_prompt, system_prompt=None, temperature=0.3, top_p=1.0) -> LLMStreamResponse`
Get a streaming text response. Yields chunks via async iteration; usage metrics are available after the stream completes.
#### `get_structured_json_response(response_model, user_prompt, system_prompt=None, temperature=0.3, top_p=1.0) -> LLMStructuredResponse`
Get a response validated against a Pydantic model.
### Response Objects
All response objects include usage metrics:
| Field | Type | Description |
|-------|------|-------------|
| `content` | `str` / `dict` / `BaseModel` | The response content |
| `input_tokens` | `int` | Number of input tokens |
| `output_tokens` | `int` | Number of output tokens |
| `cached_tokens` | `int` | Number of cached tokens (if applicable) |
| `input_cost` | `float` | Cost for input tokens (USD) |
| `output_cost` | `float` | Cost for output tokens (USD) |
| `total_cost` | `float` | Total cost (USD) |
| `response_time` | `float` | Response time in seconds |
## Advanced Usage
### Automatic Fallback with LLMCascade
Use `LLMCascade` for automatic failover between providers:
```python
from majordomo_llm import LLMCascade
# Providers are tried in order - first is primary, rest are fallbacks
cascade = LLMCascade([
("anthropic", "claude-sonnet-4-20250514"), # Primary
("openai", "gpt-4o"), # First fallback
("gemini", "gemini-2.5-flash"), # Last resort
])
# If Anthropic fails, automatically tries OpenAI, then Gemini
response = await cascade.get_response("Hello!")
```
All response methods (`get_response`, `get_json_response`, `get_structured_json_response`, `get_response_stream`) support automatic fallback.
### Direct Provider Access
You can also instantiate providers directly for more control:
```python
from majordomo_llm import Anthropic
llm = Anthropic(
model="claude-sonnet-4-20250514",
input_cost=3.0, # per million tokens
output_cost=15.0, # per million tokens
)
```
### Web Search (Anthropic)
Enable web search for supported Claude models:
```python
from majordomo_llm.providers.anthropic import Anthropic
llm = Anthropic(
model="claude-sonnet-4-5-20250929",
input_cost=3.0,
output_cost=15.0,
use_web_search=True,
)
```
### Request Logging
Log all LLM requests asynchronously to a database with optional storage for request/response bodies. Logging is fire-and-forget and does not block your main request flow.
```python
from majordomo_llm import get_llm_instance
from majordomo_llm.logging import LoggingLLM, PostgresAdapter, S3Adapter
async def main():
# Create your LLM instance
llm = get_llm_instance("anthropic", "claude-sonnet-4-20250514")
# Set up database adapter (PostgreSQL, MySQL, or SQLite)
db = await PostgresAdapter.create(
host="localhost",
port=5432,
database="llm_logs",
user="postgres",
password="password",
)
# Optional: Set up S3 for storing request/response bodies
storage = await S3Adapter.create(
bucket="my-llm-logs",
prefix="requests", # optional, defaults to "llm-logs"
)
# Wrap your LLM with logging
logged_llm = LoggingLLM(llm, db, storage)
# Use as normal - all requests are logged automatically
response = await logged_llm.get_response("Hello!")
# Don't forget to close connections when done
await logged_llm.close()
```
#### Local Development Setup
For local development and testing, use SQLite and local file storage:
```python
from majordomo_llm import get_llm_instance
from majordomo_llm.logging import LoggingLLM, SqliteAdapter, FileStorageAdapter
async def main():
llm = get_llm_instance("anthropic", "claude-sonnet-4-20250514")
# SQLite for metrics (auto-creates database and table)
db = await SqliteAdapter.create("llm_logs.db")
# Local file storage for request/response bodies
storage = await FileStorageAdapter.create("./request_logs")
logged_llm = LoggingLLM(llm, db, storage)
response = await logged_llm.get_response("Hello!")
await logged_llm.close()
```
#### API Key Tracking
Track which API key was used for each request with optional human-readable aliases:
```python
from majordomo_llm.providers.anthropic import Anthropic
# Create LLM with API key alias for attribution
llm = Anthropic(
model="claude-sonnet-4-20250514",
input_cost=3.0,
output_cost=15.0,
api_key_alias="production-team-1", # Optional human-readable name
)
# The LoggingLLM wrapper automatically logs:
# - api_key_hash: First 16 chars of SHA256 hash (safe for logging)
# - api_key_alias: Your custom name (e.g., "production-team-1")
```
This is useful for:
- Tracking costs per team or application
- Debugging which key was used for specific requests
- Auditing API key usage patterns
#### Database Schema
Create the logging table using the included schema:
```sql
CREATE TABLE IF NOT EXISTS llm_requests (
request_id VARCHAR(36) PRIMARY KEY,
provider VARCHAR(50) NOT NULL,
model VARCHAR(100) NOT NULL,
timestamp TIMESTAMP NOT NULL,
response_time FLOAT,
input_tokens INTEGER,
output_tokens INTEGER,
cached_tokens INTEGER,
input_cost DECIMAL(10, 8),
output_cost DECIMAL(10, 8),
total_cost DECIMAL(10, 8),
s3_request_key VARCHAR(255),
s3_response_key VARCHAR(255),
status VARCHAR(20) NOT NULL,
error_message TEXT,
api_key_hash VARCHAR(16),
api_key_alias VARCHAR(100)
);
```
#### Available Adapters
**Database Adapters:**
- **PostgresAdapter** - PostgreSQL via asyncpg
- **MySQLAdapter** - MySQL via aiomysql
- **SqliteAdapter** - SQLite via aiosqlite (great for local development)
**Storage Adapters:**
- **S3Adapter** - AWS S3 via aioboto3
- **FileStorageAdapter** - Local filesystem (great for local development)
## Development
### Setup
```bash
git clone https://github.com/superset-studio/majordomo-llm.git
cd majordomo-llm
uv sync --all-extras
```
### Running Tests
```bash
uv run pytest
```
### Type Checking
```bash
uv run mypy src/majordomo_llm
```
### Linting
```bash
uv run ruff check src/majordomo_llm
```
### Documentation
Build and preview the docs locally:
```bash
uv add --dev mkdocs mkdocs-material mkdocstrings[python] pymdown-extensions
uv run mkdocs serve
```
### Pre-commit Hooks & Checks
Enable local checks (using uvx):
```bash
uvx pre-commit install
uvx pre-commit run --all-files
```
Hooks include private-key detection and basic hygiene checks. See `.pre-commit-config.yaml`.
## Contributing
Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
| text/markdown | null | Vivek Vaidya <vivek@superset.com> | null | null | MIT | ai, anthropic, async, claude, cohere, gemini, gpt, llm, machine-learning, openai | [
"Development Status :: 4 - Beta",
"Framework :: AsyncIO",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Typing :: Typed"
] | [] | null | null | >=3.12 | [] | [] | [] | [
"anthropic>=0.76.0",
"cohere>=5.1.8",
"google-genai>=1.60.0",
"openai>=2.15.0",
"pre-commit>=4.5.1",
"pydantic>=2.12.5",
"pyyaml>=6.0",
"tenacity>=9.1.2",
"aioboto3>=13.0.0; extra == \"dev\"",
"aiofiles>=24.0.0; extra == \"dev\"",
"aiomysql>=0.2.0; extra == \"dev\"",
"aiosqlite>=0.20.0; extra == \"dev\"",
"asyncpg>=0.29.0; extra == \"dev\"",
"mypy>=1.14.0; extra == \"dev\"",
"pytest-asyncio>=0.24.0; extra == \"dev\"",
"pytest-cov>=6.0.0; extra == \"dev\"",
"pytest>=8.0.0; extra == \"dev\"",
"python-dotenv>=1.0.0; extra == \"dev\"",
"ruff>=0.9.0; extra == \"dev\"",
"aioboto3>=13.0.0; extra == \"logging\"",
"aiofiles>=24.0.0; extra == \"logging\"",
"aiomysql>=0.2.0; extra == \"logging\"",
"aiosqlite>=0.20.0; extra == \"logging\"",
"asyncpg>=0.29.0; extra == \"logging\""
] | [] | [] | [] | [
"Homepage, https://github.com/superset-studio/majordomo-llm",
"Documentation, https://majordomo-llm.readthedocs.io/",
"Repository, https://github.com/superset-studio/majordomo-llm",
"Issues, https://github.com/superset-studio/majordomo-llm/issues",
"Changelog, https://github.com/superset-studio/majordomo-llm/blob/main/CHANGELOG.md"
] | twine/6.2.0 CPython/3.13.2 | 2026-02-20T19:02:38.802559 | majordomo_llm-0.3.2.tar.gz | 188,063 | 31/55/ab7200748100aaf490d5f9e337bbc2c2512b697fdc257b63e912264118be/majordomo_llm-0.3.2.tar.gz | source | sdist | null | false | 2ddf09f8c3ebc8ef21133502b3671e18 | 710ee07e2c80faa240d1a8719ec81505efa8ab9cecba9890de481b642203defa | 3155ab7200748100aaf490d5f9e337bbc2c2512b697fdc257b63e912264118be | null | [
"LICENSE"
] | 175 |
2.3 | u | 2.1 | Statically typed units | # u
Statically typed units.
## Quickstart
Type safe assignments:
```python
duration: u.Duration = u.seconds(5) # Ok
distance: u.Distance = u.amperes(5) # Type checking error
```
Type safe math:
```python
print(u.seconds(120) + u.minutes(3)) # Ok
print(u.seconds(120) + u.amperes(3)) # Type checking error
```
Type safe derived units:
```python
SPEED = u.DIV[u.DISTANCE, u.DURATION]
Speed = u.Quantity[SPEED]
speed: Speed = u.km(5) / u.hours(1) # Ok
speed: Speed = (u.km / u.hours)(5) # Also ok
ELECTRIC_CHARGE = u.MUL[u.DURATION, u.ELECTRIC_CURRENT]
ElectricCharge = u.Quantity[ELECTRIC_CHARGE]
charge: ElectricCharge = u.sec(3) * u.amperes(2) # Ok
charge: ElectricCharge = u.amperes(2) * u.sec(3) # Also ok
```
Reusable prefixes:
```python
print(u.megabytes(5) == u.mega(u.bytes)(5)) # True
```
Define your own quantities and units:
```python
class TASTINESS(u.QUANTITY):
pass
Tastiness = u.Quantity[TASTINESS]
mmm = u.Unit(Tastiness, symbol='mmm', multiplier=1)
yum = u.Unit(Tastiness, 'yum', 10)
taste: Tastiness = yum(42)
```
Convert to string:
```python
thousand_meters = u.meters(1000)
print(thousand_meters) # Automatically selects a suitable unit: "1 km"
print(f'{thousand_meters:m}') # Uses the specified unit: "1000 m"
print(f'{thousand_meters:cm:m}') # Selects a unit from the given range: "1000 m"
print(f'{thousand_meters:.1f m}') # Formats the number: "1000.0 m"
```
## Caveats
Since type checkers don't understand math, calculations involving different types of quantities
sometimes cause type checkers to complain even though they're correct. For example:
```python
area: u.Area = (u.m2 * u.kelvins / u.kelvins)(1) # Type checking error
```
## Documentation
There is no online documentation, but everything has docstrings and type annotations. Your IDE
should be able to show you all the relevant information.
| text/markdown | null | Aran-Fey <rawing7@gmail.com> | null | null | null | null | [
"Programming Language :: Python :: 3"
] | [] | null | null | >=3.10 | [] | [
"u"
] | [] | [
"typing-extensions"
] | [] | [] | [] | [
"Issues, https://github.com/Aran-Fey/u/issues",
"Repository, https://github.com/Aran-Fey/u"
] | python-requests/2.32.5 | 2026-02-20T19:01:47.380111 | u-2.1.tar.gz | 32,439 | 83/74/acec941caa339b59d9513ad709938fea6a4dc0339783d7b2224949a90499/u-2.1.tar.gz | source | sdist | null | false | 40213340ce932675ec4f4e113fc094ff | af82467fbeb97b1500799bd7c26bb6f46d891670938d9c46185e525a9d029993 | 8374acec941caa339b59d9513ad709938fea6a4dc0339783d7b2224949a90499 | null | [] | 238 |
2.4 | ofastlylog | 0.2.0 | Process fastly OSM logs | # OSM Fastly Logs
Processes logs from Fastly for OpenStreetMap
| text/markdown | null | null | null | null | null | null | [
"Development Status :: 1 - Planning",
"Environment :: Console",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3"
] | [] | null | null | <4,>=3.11 | [] | [] | [] | [
"pyathena",
"pyathena[pandas]",
"typer>=0.24.0"
] | [] | [] | [] | [] | twine/6.1.0 CPython/3.13.7 | 2026-02-20T19:01:40.960621 | ofastlylog-0.2.0.tar.gz | 48,092 | 7d/b5/7fef0dedd9b9a643cc05eaf608a8ab443fe65ee2cc66367529f6bb58f6c3/ofastlylog-0.2.0.tar.gz | source | sdist | null | false | c9876eb6f83cc3b8b5387faba05917ec | 0636a7d434279e16e51e86a49409deace8a2f4ee0467fceafc0863b70d95c2f5 | 7db57fef0dedd9b9a643cc05eaf608a8ab443fe65ee2cc66367529f6bb58f6c3 | GPL-3.0-or-later | [
"LICENSE"
] | 201 |
2.4 | everysk-lib | 1.11.5 | Generic lib to share python code on Everysk. |
# Everysk Library
| | |
| --- | --- |
| Testing | [](https://github.com/Everysk/everysk-lib/actions/workflows/coverage.yml) [](https://github.com/Everysk/everysk-lib/actions/workflows/security-checks.yml) |
| Package | [](https://pypi.org/project/everysk-lib/) |
The **Everysk Library** is a one-stop solution designed to help our teams and partners streamline workflows and maximize productivity.
Many projects at Everysk rely on multiple **endpoints**, **engines**, and **utilities** to automate workflows, handle entities such as portfolios, datastores, reports, and files, and perform complex calculations. Adopting and maintaining each of these components individually can be both time-consuming and expensive.
To address this challenge, Everysk developed the Everysk Library: a unified Python library that bundles these capabilities into a single, convenient package.
By consolidating essential functionalities — ranging from portfolio creation to workflow automation — Everysk Lib greatly simplifies implementation and ongoing maintenance. This all-in-one toolkit ensures you have everything you need to build powerful, scalable solutions across a variety of Everysk projects.
<br>
## Table of Contents
- [Module Structure](#module-structure)
- [Installation](#installation)
- [Running Tests](#running-tests)
- [Running Tests with coverage](#running-tests-with-coverage)
- [Contributing](#contributing)
- [License](#license)
## Module Structure
Below we have the main directories that you will be working with.
```mermaid
flowchart TB
EveryskLibrary(["Everysk Library"])
SDKDir(["sdk"])
CoreDir(["core"])
ServerDir(["server"])
ApiDir(["api"])
EveryskLibrary --> SDKDir
EveryskLibrary --> CoreDir
EveryskLibrary --> ServerDir
EveryskLibrary --> ApiDir
```
<br>
## Installation
To install the **Everysk library**, you will need to use pip's `install` command:
```bash
pip install everysk-lib
```
### Verifying the Installation
After installing the library, it's a good practice to verify if the installation was successful. Here is how to achieve this:
#### 1. Open a terminal
#### 2. Start the Python interpreter by typing `python` and pressing `Enter`
#### 3. In the Python interpreter, type the following command then press `Enter`:
```python
import everysk
```
If the library has been installed correctly, this command should complete without any errors. If the library is not installed or there's a problem with the installation, Python will raise a `ModuleNotFoundError`
<br>
## Documentation
The main documentation of the Everysk Library can be founded here: [Everysk Library Documentation](docs/README.md)
<br>
## Running Tests
This section provides instructions on how to run tests for the project. There are two scenarios, the first one is running tests in a development environment and the second one is running tests after the library has been installed from PyPI.
### Running Tests in Development Environment
In a development environment you can use the provided shell script to run the tests. The script sets up the necessary environment and then run the tests. To execute the tests, open a bash terminal and run the following command.
```bash
./run.sh tests
```
### Running Tests After the Library is Installed
After the library has been installed in your project from PyPI, you can start running tests using Python's built-in unittest module. To run tests use the following command:
```bash
python3 -m unittest everysk.core.tests
```
The command uses Python's unittest module as mentioned above as a script, which then runs the test in the `everysk.core.tests` package.
<br>
## Running Tests with coverage
Code coverage us a way of measuring how many lines of code are executed while the automated tests are running.
To run tests along with a coverage report, you can use the provided shell script. The script will not only run the tests but also generate a coverage report that shows the percentage of code that was executed during the tests.
This is useful to identify sections of your code that are not being tested and may need additional tests.
#### 1. Open a terminal in your Visual Studio Code environment.
#### 2. Run the following command.
```bash
./run.sh coverage
```
This command executes the `run.sh` script with the `coverage` argument. The report will be displayed in the terminal after the script completed the tests.
**Remember:** a high coverage percentage is generally good, but 100% coverage does not ensures that your code is free from bugs or any other problem that might occur in your code. The full coverage just means that all the lines in your code were executed during the tests.
<br>
## Contributing
Contributions are always welcome and greatly appreciated!
Go to the repository [link](https://github.com/Everysk/everysk-lib) and click on the `Fork` button to create your own copy of the everysk library.
Then clone the project in your own local machine by running the command below or using the **GitHub Desktop**.
```bash
git clone https://github.com/<your-username>/everysk-lib.git everysk-yourusername
```
This section creates a directory called `everysk-yourusername` to center all your code.
After that you can change the directory by:
```bash
cd everysk-yourusername
```
Create the **upstream** repository which will refer to the main repository that you just forked.
```bash
git remote add upstream https://github.com/Everysk/everysk-lib.git
```
Now run the following commands to make sure that your clone is up-to-date with main everysk repository
```bash
git checkout main
git pull upstream main
```
Shortly after, create a new branch to add your code
```bash
git checkout -b brand-new-feature
```
The command above will automatically switch to this newly created branch. At this moment your are able to make your modifications to the code and commit locally as you progress.
After all the code changes, you can submit your contribution by pushing the changes to your fork on GitHub:
```bash
git push origin brand-new-feature
```
The command above ensures that all the modifications that you've made are up-to-date with your current branch.
At the end of this process you will need to make a **Pull Request** to the main branch.
To achieve this, go to the GitHub page of the project and click on the `Pull requests` tab, then click on `New pull request` button.
This will open a new section used to compare branches, now choose your branch for merging into the main branch and hit the `Create pull request` button.
<br>
## License
(C) Copyright 2025 EVERYSK TECHNOLOGIES
This is an unpublished work containing confidential and proprietary
information of EVERYSK TECHNOLOGIES. Disclosure, use, or reproduction
without authorization of EVERYSK TECHNOLOGIES is prohibited.
Date: Jan 2025
Contact: contact@everysk.com
URL: https://everysk.com/
<br>
<hr>
<br>
[Back to the top](#everysk-library)
| text/markdown | null | null | null | null | null | python, development, lib | [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Topic :: Software Development :: Build Tools",
"Programming Language :: Python :: 3.11"
] | [] | null | null | >=3.11 | [] | [] | [] | [
"python-dateutil<=3.0.0,>=2.8.2",
"holidays==0.51",
"tzdata<=2025.2,>=2024.1",
"certifi==2025.10.5; extra == \"requests\"",
"charset_normalizer==3.4.4; extra == \"requests\"",
"idna==3.11; extra == \"requests\"",
"urllib3==2.6.3; extra == \"requests\"",
"requests==2.32.5; extra == \"requests\"",
"certifi==2025.10.5; extra == \"firestore\"",
"charset-normalizer==3.3.2; extra == \"firestore\"",
"idna==3.6; extra == \"firestore\"",
"urllib3==2.6.3; extra == \"firestore\"",
"requests==2.32.4; extra == \"firestore\"",
"pyasn1==0.5.1; extra == \"firestore\"",
"pyasn1-modules==0.3.0; extra == \"firestore\"",
"cachetools==5.3.2; extra == \"firestore\"",
"rsa==4.9; extra == \"firestore\"",
"google-auth==2.28.1; extra == \"firestore\"",
"googleapis-common-protos==1.62.0; extra == \"firestore\"",
"grpcio==1.60.1; extra == \"firestore\"",
"grpcio-status==1.60.1; extra == \"firestore\"",
"google-api-core[grpc]==2.17.1; extra == \"firestore\"",
"google-cloud-core==2.4.1; extra == \"firestore\"",
"proto-plus==1.23.0; extra == \"firestore\"",
"protobuf==4.25.8; extra == \"firestore\"",
"google-cloud-firestore==2.15.0; extra == \"firestore\"",
"hiredis==3.3.0; extra == \"redis\"",
"redis==7.0.0; extra == \"redis\"",
"certifi==2025.10.5; extra == \"tasks\"",
"charset-normalizer==3.3.2; extra == \"tasks\"",
"idna==3.6; extra == \"tasks\"",
"urllib3==2.6.3; extra == \"tasks\"",
"requests==2.32.4; extra == \"tasks\"",
"pyasn1==0.5.1; extra == \"tasks\"",
"pyasn1-modules==0.3.0; extra == \"tasks\"",
"cachetools==5.3.2; extra == \"tasks\"",
"rsa==4.9; extra == \"tasks\"",
"google-auth==2.28.1; extra == \"tasks\"",
"googleapis-common-protos==1.62.0; extra == \"tasks\"",
"grpcio==1.60.1; extra == \"tasks\"",
"grpcio-status==1.60.1; extra == \"tasks\"",
"google-api-core[grpc]==2.17.1; extra == \"tasks\"",
"google-cloud-core==2.4.1; extra == \"tasks\"",
"proto-plus==1.23.0; extra == \"tasks\"",
"protobuf==4.25.8; extra == \"tasks\"",
"grpc-google-iam-v1==0.13.0; extra == \"tasks\"",
"google-cloud-tasks==2.16.1; extra == \"tasks\"",
"MarkupSafe==2.1.5; extra == \"flask\"",
"blinker==1.8.2; extra == \"flask\"",
"click==8.1.7; extra == \"flask\"",
"itsdangerous==2.2.0; extra == \"flask\"",
"Jinja2==3.1.6; extra == \"flask\"",
"Werkzeug==3.0.3; extra == \"flask\"",
"flask==3.0.3; extra == \"flask\"",
"idna==3.10; extra == \"starlette\"",
"sniffio==1.3.1; extra == \"starlette\"",
"typing-extensions==4.15.0; extra == \"starlette\"",
"anyio==4.9.0; extra == \"starlette\"",
"certifi==2025.10.5; extra == \"starlette\"",
"h11==0.16.0; extra == \"starlette\"",
"httpcore==1.0.9; extra == \"starlette\"",
"hpack==4.1.0; extra == \"starlette\"",
"hyperframe==6.1.0; extra == \"starlette\"",
"h2==4.3.0; extra == \"starlette\"",
"httpx==0.28.1; extra == \"starlette\"",
"MarkupSafe==3.0.2; extra == \"starlette\"",
"jinja2==3.1.6; extra == \"starlette\"",
"itsdangerous==2.2.0; extra == \"starlette\"",
"python-multipart==0.0.22; extra == \"starlette\"",
"pyyaml==6.0.3; extra == \"starlette\"",
"starlette==0.49.1; extra == \"starlette\"",
"idna==3.10; extra == \"httpx\"",
"sniffio==1.3.1; extra == \"httpx\"",
"typing-extensions==4.15.0; extra == \"httpx\"",
"anyio==4.9.0; extra == \"httpx\"",
"certifi==2025.10.5; extra == \"httpx\"",
"h11==0.16.0; extra == \"httpx\"",
"httpcore==1.0.9; extra == \"httpx\"",
"hpack==4.1.0; extra == \"httpx\"",
"hyperframe==6.1.0; extra == \"httpx\"",
"h2==4.3.0; extra == \"httpx\"",
"httpx==0.28.1; extra == \"httpx\"",
"bcrypt==4.2.0; extra == \"paramiko\"",
"pycparser==2.22; extra == \"paramiko\"",
"cffi==2.0.0; extra == \"paramiko\"",
"cryptography==44.0.1; extra == \"paramiko\"",
"pynacl==1.6.2; extra == \"paramiko\"",
"paramiko==3.5.0; extra == \"paramiko\"",
"everysk-orjson==3.11.3; extra == \"everysk-orjson\"",
"lark==1.2.2; extra == \"expression\"",
"numpy==1.26.4; extra == \"expression\"",
"pandas==2.1.4; extra == \"expression\"",
"psycopg-binary==3.3.0; extra == \"postgresql\"",
"psycopg-pool==3.3.0; extra == \"postgresql\"",
"psycopg==3.3.0; extra == \"postgresql\""
] | [] | [] | [] | [
"Homepage, https://everysk.com/"
] | twine/6.1.0 CPython/3.13.7 | 2026-02-20T19:01:33.380405 | everysk_lib-1.11.5.tar.gz | 230,515 | 08/8f/990df683b285c5856b56655b28a5bf5662d61232a659469941453276bb0c/everysk_lib-1.11.5.tar.gz | source | sdist | null | false | 49a00b194b8c8d57af371977ebffe963 | e3c3fbb1f923d442718d940eafb1f21e9892323f1b232c9d6102784986c9a9a6 | 088f990df683b285c5856b56655b28a5bf5662d61232a659469941453276bb0c | LicenseRef-Proprietary | [
"LICENSE.txt"
] | 570 |
2.4 | emdash-ai | 0.1.174 | Graph-based coding intelligence system - The 'Senior Engineer' Context Engine | # emdash-ai
Graph-based coding intelligence system - The 'Senior Engineer' Context Engine
## Quick Install (macOS)
```bash
brew install uv cmake
uv tool install emdash-ai
```
## Quick Install (Linux)
```bash
# Install dependencies
sudo apt-get install cmake # Debian/Ubuntu
# or: sudo dnf install cmake # Fedora
# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
# Add uv to PATH (add to ~/.bashrc or ~/.zshrc)
export PATH="$HOME/.cargo/bin:$PATH"
uv tool install emdash-ai
```
> **Note:** After installation, you may need to reload your shell config:
> ```bash
> source ~/.zshrc # or ~/.bashrc
> ```
### Update
```bash
uv tool upgrade emdash-ai
```
## Requirements
- Python 3.10+ (3.10-3.13 recommended)
- cmake (for building the graph database)
## Usage
```bash
em # Start the AI coding agent
emdash index # Index your codebase
emdash agent # Start the AI agent (alternative)
```
## Slash Commands
Once inside the agent REPL, use these slash commands:
### Mode Switching
| Command | Description |
|---------|-------------|
| `/plan` | Switch to plan mode (explore codebase, create plans) |
| `/code` | Switch to code mode (execute file changes) |
| `/mode` | Show current operating mode |
### Generation & Research
| Command | Description |
|---------|-------------|
| `/projectmd` | Generate PROJECT.md describing your codebase architecture |
| `/pr [url]` | Review a pull request (e.g., `/pr 123` or `/pr https://github.com/org/repo/pull/123`) |
| `/research [goal]` | Deep research on a topic (e.g., `/research How does auth work?`) |
### Status & Context
| Command | Description |
|---------|-------------|
| `/status` | Show index and PROJECT.md status |
| `/context` | Show current context frame (tokens, reranked items) |
| `/compact` | Compact message history using LLM summarization |
| `/spec` | Show current specification from plan mode |
### Todo Management
| Command | Description |
|---------|-------------|
| `/todos` | Show current agent todo list |
| `/todo-add [title]` | Add a todo item for the agent |
### Session Management
| Command | Description |
|---------|-------------|
| `/session` | Interactive session menu |
| `/session save [name]` | Save current session |
| `/session load [name]` | Load a saved session |
| `/session list` | List all saved sessions |
| `/session delete [name]` | Delete a session |
| `/reset` | Reset session state |
### Configuration
| Command | Description |
|---------|-------------|
| `/agents` | Manage agents (create, show, edit, delete) |
| `/rules` | Manage rules that guide agent behavior |
| `/skills` | Manage reusable skills |
| `/hooks` | Manage event hooks (triggers on tool_start, session_end, etc.) |
| `/mcp` | Manage MCP servers |
| `/registry` | Browse and install community plugins, skills, rules, agents, and verifiers |
| `/setup` | Interactive setup wizard |
### Verification
| Command | Description |
|---------|-------------|
| `/verify` | Run verification checks on current work |
| `/verify-loop [task]` | Run task in loop until all verifications pass |
### Authentication & Diagnostics
| Command | Description |
|---------|-------------|
| `/auth` | GitHub authentication (login, logout, status) |
| `/doctor` | Check environment and diagnose issues |
### Help & Exit
| Command | Description |
|---------|-------------|
| `/help` | Show available commands |
| `/quit` | Exit the agent (also `/exit`, `/q`) |
## Keyboard Shortcuts
| Shortcut | Action |
|----------|--------|
| `Ctrl+Space` | Auto-complete commands |
| `Alt+Enter` | Multi-line input |
| `Ctrl+V` | Paste image from clipboard |
| `@filename` | Reference a file in your prompt |
## Features
- Graph-based code analysis
- Semantic code search
- AI-powered code exploration
- MCP server integration
- Session persistence
- Custom agents, rules, and skills
- Event hooks for automation
- Verification loops
- Plugin system for bundled workflows
## Configuration
Configuration files are stored in `.emdash/` in your project root:
```
.emdash/
├── agents/ # Custom agent definitions
├── rules/ # Coding rules and guidelines
├── skills/ # Reusable skills
├── plugins/ # Installed plugin manifests
├── sessions/ # Saved sessions
├── hooks.json # Event hooks configuration
├── plugins.json # Installed plugins tracking
└── verifiers.json # Verification configurations
```
Global config at `~/.config/emdash/`:
```
~/.config/emdash/
├── mcp.json # MCP server configuration
└── config.json # Global settings
```
## Troubleshooting
### Build fails with "cmake: command not found"
If you see `Failed to build kuzu` with cmake errors:
```bash
# macOS
brew install cmake
# Linux (Debian/Ubuntu)
sudo apt-get install cmake
# Then retry
uv tool install emdash-ai
```
### "permission denied: em"
If you get `zsh: permission denied: em` or similar:
```bash
# Check if uv tool installed it
uv tool list
# Reinstall
uv tool uninstall emdash-ai && uv tool install emdash-ai
```
### Command not found
If `em` or `emdash` is not found, add `~/.local/bin` to your PATH:
```bash
# For zsh (add to ~/.zshrc)
export PATH="$HOME/.local/bin:$PATH"
# For bash (add to ~/.bashrc or ~/.bash_profile)
export PATH="$HOME/.local/bin:$PATH"
# Then reload
source ~/.zshrc # or ~/.bashrc
```
### Debug installation
```bash
# Check which em is being found
which em
type em
# Check permissions
ls -la ~/.local/bin/em
# Check installed version
uv tool list
```
### Uninstall
```bash
uv tool uninstall emdash-ai
```
## Running Terminal-Bench
Run the [terminal-bench](https://github.com/runloopai/terminal-bench) benchmark to evaluate agent performance.
### Prerequisites
- Docker running (Colima or Rancher Desktop)
- Harbor installed: `pip install harbor`
### Setup
```bash
cd benchmarks
uv venv .venv
uv pip install -r requirements.txt
```
### Run
```bash
./benchmarks/scripts/run.sh
```
With custom settings:
```bash
MODEL="qwen3-vl-235b" PARALLEL=2 ./benchmarks/scripts/run.sh
```
| Variable | Default | Description |
|----------|---------|-------------|
| `MODEL` | claude-haiku-4-5 | Model to benchmark |
| `PARALLEL` | 4 | Concurrent tasks |
| `DATASET` | terminal-bench@2.0 | Dataset to run |
| text/markdown | Em Dash Team | null | null | null | null | null | [] | [] | null | null | >=3.10 | [] | [] | [] | [
"astroid>=3.0.1",
"click>=8.1.7",
"cmake>=3.25.0",
"emdash-cli",
"emdash-core",
"gitpython>=3.1.40",
"httpx>=0.25.0",
"kuzu>=0.4.0",
"loguru>=0.7.2",
"networkx>=3.2.1",
"numpy>=1.26.0",
"openai>=1.0.0",
"prompt-toolkit>=3.0.43",
"pydantic>=2.5.0",
"pygithub>=2.1.1",
"pypng>=0.0.21",
"python-dotenv>=1.0.0",
"python-louvain>=0.16",
"rich>=13.7.0",
"scipy>=1.11.4",
"tqdm>=4.66.1",
"black>=23.11.0; extra == \"dev\"",
"mypy>=1.7.1; extra == \"dev\"",
"pyinstaller<7.0,>=6.0; extra == \"dev\"",
"pytest-cov>=4.1.0; extra == \"dev\"",
"pytest>=7.4.3; extra == \"dev\"",
"ruff>=0.1.6; extra == \"dev\"",
"accelerate>=0.25.0; extra == \"local\"",
"torch>=2.1.0; extra == \"local\"",
"transformers>=4.36.0; extra == \"local\""
] | [] | [] | [] | [] | uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","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} | 2026-02-20T19:00:59.376532 | emdash_ai-0.1.174.tar.gz | 12,553 | f8/87/9a182b1f010a6b2ed99039193667dedc496ff8ef777498d06289146c5dd9/emdash_ai-0.1.174.tar.gz | source | sdist | null | false | 612cd733453f335fb77b7a6d9ac1c27a | 969e6fc38a6d94efe722cd1b66bd933a79dd84da9ea2fee7593581c89e6ade7f | f8879a182b1f010a6b2ed99039193667dedc496ff8ef777498d06289146c5dd9 | null | [] | 193 |
2.4 | flake8-sqlalchemy2 | 0.2.0 | flake8 plugin for SQLAlchemy 2.0 | # flake8-sqlalchemy2
`flake8` plugin to enforce modern, typed SQLAlchemy 2.0.
## Installation
Use `uvx` for a one-time check of your code base:
```bash
uvx --with flake8-sqlalchemy2 flake8 --select SA2
```
Install via `pip` for using as "permanent" `flake8` plugin:
```bash
pip install flake8-sqlalchemy2
```
## Rules
### missing-mapped-type-annotation (SA201)
#### What it does
Checks for existence of `Mapped` or other ORM container class type annotations in SQLAlchemy
models.
#### Why is this bad?
If an annotation is missing, type checkers will treat the corresponding field as type `Any`.
#### Example
```python
from sqlalchemy import Integer
from sqlalchemy.orm import DeclarativeBase
from sqlalchemy.orm import Mapped
from sqlalchemy.orm import mapped_column
class Base(DeclarativeBase):
pass
class MyModel(Base):
__tablename__ = "my_model"
id: Mapped[int] = mapped_column(primary_key=True)
count = mapped_column(Integer)
m = MyModel()
reveal_type(m.count) # note: Revealed type is "Any"
```
Use instead:
```python
from sqlalchemy.orm import DeclarativeBase
from sqlalchemy.orm import Mapped
from sqlalchemy.orm import mapped_column
class Base(DeclarativeBase):
pass
class MyModel(Base):
__tablename__ = "my_model"
id: Mapped[int] = mapped_column(primary_key=True)
count: Mapped[int]
m = MyModel()
reveal_type(m.count) # note: Revealed type is "builtins.int"
```
### legacy-collection (SA202)
#### What it does
Checks for existence of `DynamicMapped`.
#### Why is this bad?
`DynamicMapped` is considered legacy and exposes the legacy query API.
#### Example
```python
from sqlalchemy.orm import DeclarativeBase
from sqlalchemy.orm import DynamicMapped
from sqlalchemy.orm import mapped_column
from sqlalchemy.orm import Mapped
from sqlalchemy.orm import relationship
class Base(DeclarativeBase):
pass
class MyModel(Base):
__tablename__ = "my_model"
id: Mapped[int] = mapped_column(primary_key=True)
children: DynamicMapped["Child"] = relationship()
```
Use instead:
```python
from sqlalchemy.orm import DeclarativeBase
from sqlalchemy.orm import mapped_column
from sqlalchemy.orm import Mapped
from sqlalchemy.orm import relationship
from sqlalchemy.orm import WriteOnlyMapped
class Base(DeclarativeBase):
pass
class MyModel(Base):
__tablename__ = "my_model"
id: Mapped[int] = mapped_column(primary_key=True)
children: WriteOnlyMapped["Child"] = relationship()
```
## Note on `ruff`
Q: Why still use `flake8` when there is `ruff`!?
A: For rules not supported by `ruff`. There is a proposed [merge request](https://github.com/astral-sh/ruff/pull/18065) to bring the first SQLAlchemy linting rule (`SA201`) to `ruff` ("needs-decision" tagged).
## Note on `flake8-sqlalchemy`
Q: Why not integrate these rules into `flake8-sqlalchemy`?
A: The focus of this package are rules for modern, typed SQLAlchemy. Furthermore, I wanted to learn something new.
| text/markdown | null | Jannic Beck <jannic.warken@gmail.com> | null | null | null | flake8, linting, python, sqlalchemy, sqlalchemy2 | [
"Framework :: Flake8",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14"
] | [] | null | null | >=3.10 | [] | [] | [] | [
"flake8!=3.2,>=3"
] | [] | [] | [] | [
"Repository, https://github.com/kreathon/flake8-sqlalchemy2",
"Issues, https://github.com/kreathon/flake8-sqlalchemy2/issues"
] | twine/6.1.0 CPython/3.13.7 | 2026-02-20T19:00:04.749512 | flake8_sqlalchemy2-0.2.0.tar.gz | 27,846 | 1b/71/9e6843b6625662cd5787fde5bc992e446aa799d20f2d2aee0ce3cd917525/flake8_sqlalchemy2-0.2.0.tar.gz | source | sdist | null | false | ebd41ed23817a2aeb59a7585308ec133 | 2327e48e7c5726a1368c3c6ea6ab441913c7f3e9f07d26e551e775860ae590cf | 1b719e6843b6625662cd5787fde5bc992e446aa799d20f2d2aee0ce3cd917525 | MIT | [
"LICENSE"
] | 166 |
2.4 | faker-cn | 0.1.2 | The most rigorous and realistic Chinese Persona Provider for Python Faker. | # faker-cn: 中国大陆高保真虚拟数据生成引擎
`faker-cn` 是官方原版 [Python Faker](https://github.com/joke2k/faker) 的完全独立第三方提供者 (Provider)。
> **注意**:本项目作为原生扩展独立运行,与任何修改了 Faker 源码且未提交 PR 的个人魔改版**均无关联**,您可以直接在官方标准版的 Faker 环境中无缝挂载使用。
它专门针对中国大陆身份数据进行了**高精度的严谨构造和校验**。所有的设定不仅为了“随机字符串”,更是为了实现社会逻辑的**绝对自洽**。
---
## � 核心独家特性 (Why faker-cn?)
区别于传统的随机生成,`faker-cn` 注入了大量符合现实国情的逻辑判断:
1. **具有时代感的姓名 (Era-based Probabilistic & Gender-Strict Names)**
- 抛弃生硬的穷举。70后有 50% 概率叫“建军、淑兰”;10后有超 90% 的概率叫“子涵、宇轩”。**姓名分布严格吻合年代缩影,且实现了极高精度的性别特征隔离(如男性绝不会叫“丽娟”)。**
2. **逻辑自洽的财产与车辆 (Contextual Assets & Vehicle Plates)**
- 模拟真实 25% 车主比例,车主身份与**年龄(25-55岁)和月薪(>15k概率极高)强绑定**。
- **真实人生轨迹的车牌**:车牌前缀 60% 落实在工作地,30% 落实在户籍地,10% 模拟在教育大省(如湖北、江苏)上牌。更有 15% 的几率生成新能源绿牌(带 D/F 标识)。
3. **特化的国内网络足迹 (Digital Footprint Dynamics)**
- **分层的主力邮箱**:年轻人(<25岁)大量分配 `@qq.com`;中年及职场人多为 `@163.com`。
- **拒绝盲目的 Gmail**:只有“程序员、高管、外贸、科学家”等涉外强相关职业,才有几率生成 `gmail.com`。
- **逻辑自洽的个人主页 (WebHome)**:不再盲目生成 URL。**只有计算机/互联网相关从业者**(程序员、架构师等)才会分配个人主页(如 `github.io` 或 `.me`),且域名与用户名严格锁定。其余行业人员默认为“无”。
- **专属 Yopmail 临时邮箱**:每个人物都会携带一个 `yopmail` 邮箱及一键直达链接 (`yopmail_url`)。
4. **AI 赋能:人生轨迹与超写实证件照 (AI-Powered Stories & Realism Photos)**
- **自动化人生长卷**:接入人工智能(DeepSeek/OpenAI 等),根据字段自动编写逻辑自洽的人物生平。
- **超写实 3:4 蓝底证件照**:通过生图引擎生成**符合 3:4 比例**、**极其写实(真人类质感)**的正面免冠蓝底证件照(色码:`#438EDB`)。
5. **硬核的底层规则校验**
- **完美的身份证生成**:18位全准,严格 GB11643-1999 校验码算法(Mod 11-2),前 6 位与生成的出生地**分毫不差**。
- 带有内置的高准度中国行政区划字典。
---
## 📦 保姆级安装指南
本库专为 Python 开发者和测试工程师编写,推荐在 Python 3.7+ 的环境中使用。
**1. 安装原生 Faker 和本项目:**
```bash
pip install Faker faker-cn
```
**2. 在代码中无缝接入:**
```python
import json
from faker import Faker
from faker_cn import PersonaProvider
# 第一步:初始化官方的 Faker(指定语言为中文)
fake = Faker('zh_CN')
# 第二步:将我们强大的 faker-cn 引擎挂载进去
fake.add_provider(PersonaProvider)
```
就是这么简单!您已经解锁了最高级别的虚拟数据生成能力。
---
## 🚀 保姆级使用教程
### 场景一:一键生成一个完整的“真实人类”
当你不传入任何参数时,`faker-cn` 会像上帝掷骰子一样,完全随机但又极其严谨地捏造一个完整的人生长卷。
```python
# 生成完整的人物档案字典
person = fake.persona()
print(f"姓名: {person['name']}, 身份证: {person['ssn']}")
print(f"他/她的主邮箱是: {person['email']}")
print(f"你还能直接去查看他的收件箱 (Yopmail): {person['yopmail_url']}")
print(f"他的车牌号是: {person['asset']['vehicle_plate']}")
print(f"他有 {person['asset']['deposit']} 存款")
```
### 场景二:我想接入人工智能 (人生轨迹+证件照)
如果你填入了 AI 的 API 密钥,`faker-cn` 将摇身一变为“赛博造物主”,为你补充照片和生平。
```python
# 传入您的 AI keys
ai_config = {
"api_key": "您的_DeepSeek_密钥",
"image_api_key": "您的_SiliconFlow_密钥" # 用于生成蓝底证件照
}
person = fake.persona(use_ai=True, ai_config=ai_config)
print(f"人生经历: {person['life_story']}")
print(f"证件照 URL: {person['avatar_url']}")
```
### 场景三:我想定制特定的人设(按需生成)
比如,你正在测试一个只针对年轻女性高端用户的系统功能,你可以这样写:
```python
# 生成一名 22-26岁,高管/外贸相关,北京户口的女性
custom_person = fake.persona(
gender='女',
age_range=(22, 26),
job='跨国企业高管'
)
print(json.dumps(custom_person, ensure_ascii=False, indent=2))
```
你会惊奇地发现,由于设定了“跨国高管”且年龄较轻:
- 她的邮箱极有可能是 `gmail.com` 或高端企业邮箱。
- 设备参数 (`os`, `user_agent`) 大概率会是最新版 iPhone 或 Mac。
- 薪水数字被动态拉高。
### 场景三:极简模式(我只要特定的某几个字段)
在做大批量写入数据库的压力测试时,你可能不需要巨大的完整字典集,只要几个关键字段。可以利用 `fields` 参数,支持**深层嵌套提取**!
```python
mini_person = fake.persona(
gender='男',
fields=[
'name', # 姓名
'social.education', # 学历 (原样在 social 字典里)
'hometown.city', # 老家的城市
'temp_email_url', # 仅提取临时邮箱直达车
'asset.vehicle_plate' # 深层嵌套:仅要车牌号
]
)
print(mini_person)
# 输出示例: {'name': '张伟', 'education': '本科', 'city': '南京市', 'temp_email_url': '...', 'vehicle_plate': '苏A·829F5'}
```
---
## 📖 返回字段全景字典 (Data Structure)
调用 `fake.persona()` 默认返回的完整 JSON 结构如下,包含四大核心模块:基础信息、户口与常驻地、社会身份与账号、资金与资产。
| 主字段 (Root Key) | 类型 | 说明 |
| :--- | :--- | :--- |
| `name` | String | 姓名(附带时代感概率分布) |
| `life_story` | String | **(AI 特有)** 自动生成的人生轨迹故事 |
| `avatar_url` | String | **(AI 特有)** 自动生成的 AI 蓝底证件照 URL |
| `gender` | String | 性别(男/女) |
| `age` | Int | 年龄 |
| `birth_date` | String | 出生年月日(YYYY-MM-DD,跟身份证完全吻合) |
| `ssn` | String | 完美的 18 位大陆身份证号 |
| `email` | String | 常规主邮箱(年轻人偏 QQ,高阶偏 Gmail/163) |
| `yopmail` / `yopmail_url` | String | **神器**:必定生成的一个 Yopmail 邮箱及一键直达链接 |
| `username` / `password` | String | 用户名与强随机密码(兼容旧版 `password`) |
| `common_password` | String | **新特性**:模拟国民习惯的“出生日期+拼音首字母”(如 `19900101zs`) |
| `common_password_upper` | String | 同上,但拼音部分为大写 |
| `strong_password` | String | 高强度随机密码(同 `password`) |
| `bank_card` / `bank_name`| String | 银行卡号(通过 Luhn 校验)及所属银行 |
| `mbti` | String | 16种 MBTI 人格类型 |
| `ethnicity` | String | 民族(地理感知分布) |
| `web_home` | String | **逻辑分配**:计算机相关行业分配个人主页,其余为“无” |
| `internet` | Dict | **互联网足迹** (包含 `guid`, `user_agent`, `os` 设备拟合) |
| `physical` | Dict | **身体特征** (包含 `height`, `weight`, `blood_type`) |
| `hometown` | Dict | **户籍信息** (包含 `province`, `city`, `area`, `address`, `postcode`) |
| `primary_phone` | Dict | **主手机号** (归属地与 `hometown` 匹配) |
| `workplace` | Dict | **常驻工作地** (包含完整的省市区街道路地址) |
| `social` | Dict | **社会背景** (包含 `education`, `employment`, `job`, `salary`, `security_question/answer`) |
| `asset` | Dict | **资产信息** (包含 `vehicle_plate` 具有轨迹逻辑的车牌号等) |
---
## 🛠️ 数据字典更新维护
内部集成的中国地名与区划等统计数据可能随物理世界政策变更。你可以使用仓库自带脚本重新抓取、聚合本地数据:
```bash
python build_dicts.py
```
## 📜 协议声明 (License)
本项目拥抱开源,采用 **[GPL-3.0 License](LICENSE)** 进行分发。您可以自由使用、修改与研究。
| text/markdown | LING71671 | ling71671@gmail.com | null | null | null | null | [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: OS Independent",
"Intended Audience :: Developers",
"Topic :: Software Development :: Testing"
] | [] | https://github.com/LING71671/faker-cn | null | >=3.7 | [] | [] | [] | [
"Faker>=30.0.0"
] | [] | [] | [] | [] | twine/6.2.0 CPython/3.13.5 | 2026-02-20T18:59:44.660610 | faker_cn-0.1.2.tar.gz | 3,566,353 | 66/a4/3e02a49399f93ca7d070ce93c8f9b61ddcc9d4dfb93ff48dff4f0eb31972/faker_cn-0.1.2.tar.gz | source | sdist | null | false | 4bdfa4e3bbc2523f8e7584a3d895d108 | 5b62cf4bc722cfe65172f2c38bb87a877d17eae4265465ca1abbde923f0a5ff7 | 66a43e02a49399f93ca7d070ce93c8f9b61ddcc9d4dfb93ff48dff4f0eb31972 | null | [
"LICENSE"
] | 172 |
2.4 | econ-ark | 0.17.1 | Heterogenous Agents Resources & toolKit | <div align="center">
<a href="https://econ-ark.org">
<img src="https://econ-ark.org/assets/img/econ-ark-logo.png" align="center">
</a>
<br>
<br>
[](https://anaconda.org/conda-forge/econ-ark)
[](https://pypi.org/project/econ-ark/)
[](https://docs.econ-ark.org/?badge=latest)
[](https://remote-unzip.deno.dev/econ-ark/HARK/main)
[](https://github.com/econ-ark/HARK/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)
[](https://zenodo.org/badge/latestdoi/50448254)
[](https://opensource.org/licenses/Apache-2.0)
[](https://numfocus.org/)
[](https://numfocus.org/donate-to-econ-ark)
[](https://github.com/econ-ark/hark/actions)
[](https://mybinder.org/v2/gh/econ-ark/DemARK/main?filepath=notebooks)
[](https://mybinder.org/v2/gh/econ-ark/HARK/main?filepath=examples)
<!--
Badges to be created:
[](
https://dev.azure.com/econ-ark/hark/_build/latest?definitionId=5)
[](
https://codecov.io/gh/econ-ark/hark)
-->
</div>
# Heterogeneous Agents Resources and toolKit (HARK)
HARK is a toolkit for the structural modeling of economic choices of optimizing and non-optimizing heterogeneous agents. For more information on using HARK, see the [Econ-ARK Website](https://econ-ark.org).
The Econ-ARK project is fiscally sponsored by [NumFOCUS](https://numfocus.org/). Consider making a [tax-deductible donation](https://numfocus.org/donate-to-econ-ark) to help the project pay for developer time, professional services, travel, workshops, and a variety of other needs.
<div align="center">
<a href="https://numfocus.org/project/econ-ark">
<img height="60px" src="https://numfocus.org/wp-content/uploads/2018/01/optNumFocus_LRG.png" align="center">
</a>
</div>
<br>
**This project is bound by a [Code of Conduct](/.github/CODE_OF_CONDUCT.md).**
# Questions/Comments/Help
We have a [Gitter](https://gitter.im) Econ-ARK [community](https://gitter.im/econ-ark/community).
# Table of Contents
- [Install](#install)
- [Usage](#usage)
- [Citation](#citation)
- [Support](#support)
- [Release Types](#release-types)
- [Documentation](#Documentation)
- [Introduction](#introduction)
- [For Students: A Gentle Introduction to Hark](#for-students-a-gentle-introduction-to-hark)
- [For Economists: Structural Modeling with Hark](#for-economists-structural-modeling-with-hark)
- [For Computational Economics Developers](#for-computational-economics-developers)
- [Contributing to HARK](#contributing-to-hark)
- [Disclaimer](#disclaimer)
## Install
Install from [Anaconda Cloud](https://docs.anaconda.com/anaconda/install/) by running:
`conda install -c conda-forge econ-ark`
Install from [PyPI](https://pypi.org/) by running:
`pip install econ-ark`
Once HARK is installed, you can copy its example notebooks into a local working directory of your choice from within a Python environment:
```python
from HARK import install_examples
install_examples()
```
Follow the simple prompts to make an examples subdirectory inside the directory you specify.
To use the interactive notebooks, you will need to install Jupyter: `pip install jupyter`. Moreover, the math and text formatting in some notebooks might require the `latex-envs` extension. To set this up, follow these steps:
1. Install the package: `pip install jupyter_latex_envs`
2. Install associated JS files: `jupyter contrib nbextension install --user`
3. Enable the extension: `jupyter nbextension enable latex_envs --user --py`
You can launch Jupyter from the command line with `jupyter notebook`, then navigate to the directory where you have installed the example notebooks. We recommend starting with `/examples/Gentle-Intro/Gentle-Intro-to-HARK.ipynb`, which links to the other introductory notebooks near the bottom.
## Usage
We start with almost the simplest possible consumption model: A consumer with constant relative risk aversion (CRRA) utility who has perfect foresight about everything except the (stochastic) date of death.
<div align="center">
<img height="52px" src="https://github.com/econ-ark/HARK/blob/main/docs/images/usage-crra-utility-function.png">
</div>
The agent's one period problem can be recursively expressed in [Bellman form](https://en.wikipedia.org/wiki/Bellman_equation) as:
<div align="center">
<img height="180px" src="https://github.com/econ-ark/HARK/blob/main/docs/images/usage-agent-problem-bellman-form.png">
</div>
<br>
To model the above problem, start by importing the `PerfForesightConsumerType` model from the appropriate `HARK` module then create an agent instance using the appropriate parameters:
```python
from HARK.models import PerfForesightConsumerType
# Create an instance of a Perfect Foresight agent with otherwise default parameters
PFexample = PerfForesightConsumerType(cycles=0)
```
With `cycles=0`, the default parameters yield a single period cycle that repeats forever.
Once the model is created, ask the the agent to solve the problem with its `solve()` method:
```python
# Tell the agent to solve the problem
PFexample.solve()
```
Solving the problem populates the agent's `solution` list attribute with solutions to each period of the problem. In the case of an infinite horizon model, there is just one element in the list, at **index-zero**.
You can retrieve the solution's consumption function from the `cFunc` attribute:
```python
# Retrieve the consumption function of the solution
PFexample.solution[0].cFunc
```
Or you can retrieve the solved value for human wealth normalized by permanent income from the solution's `.hNrm` attribute:
```python
# Retrieve the solved value for human wealth normalized by permanent income
PFexample.solution[0].hNrm
```
For a detailed explanation of the above example please see the demo notebook [_A Gentle Introduction to HARK_](https://docs.econ-ark.org/examples/Gentle-Intro/Gentle-Intro-To-HARK.html).
For more examples please visit the [examples](https://docs.econ-ark.org/docs/overview/index.html) section of the [documentation](https://docs.econ-ark.org/index.html), or the [econ-ark/DemARK](https://github.com/econ-ark/DemARK) repository.
The examples can also be copied to a local working directory for you to run and investigate; see the Install section above.
## Citation
If using Econ-ARK in your work or research please [cite our Digital Object Identifier](https://doi.org/10.5281/zenodo.1332015) or copy the BibTex below.
[](https://doi.org/10.5281/zenodo.1332015)
[1] Carroll, Christopher D, Palmer, Nathan, White, Matthew N., Kazil, Jacqueline, Low, David C, & Kaufman, Alexander. (2017, October 3). _econ-ark/HARK_
**BibText**
```
@InProceedings{carroll_et_al-proc-scipy-2018,
author = { {C}hristopher {D}. {C}arroll and {A}lexander {M}. {K}aufman and {J}acqueline {L}. {K}azil and {N}athan {M}. {P}almer and {M}atthew {N}. {W}hite },
title = { {T}he {E}con-{A}{R}{K} and {H}{A}{R}{K}: {O}pen {S}ource {T}ools for {C}omputational {E}conomics },
booktitle = { {P}roceedings of the 17th {P}ython in {S}cience {C}onference },
pages = { 25 - 30 },
year = { 2018 },
editor = { {F}atih {A}kici and {D}avid {L}ippa and {D}illon {N}iederhut and {M} {P}acer },
doi = { 10.25080/Majora-4af1f417-004 }
}
```
For more on acknowledging Econ-ARK [visit our website](https://econ-ark.org/acknowledging).
## Support
Looking for help? Please open a [GitHub issue](https://github.com/econ-ark/HARK/issues/new) or reach out to us through the gitter [community](https://gitter.im/econ-ark/community).
## Release Types
- **Current**: Under active development. Code for the Current release is in the branch for its major version number (for example, v0.10.x).
- **Development**: Under active development. Code for the Current release is in the development.
Current releases follow [Semantic Versioning](https://semver.org/). For more information please see the [Release documentation](https://github.com/econ-ark/OverARK/wiki/Release-Management).
## Documentation
Documentation for the latest release is at [docs.econ-ark.org](https://docs.econ-ark.org/).
## Introduction
### For Students: A Gentle Introduction to HARK
Most of what economists have done so far with 'big data' has been like what Kepler did with astronomical data: Organizing the data, and finding patterns and regularities and interconnections.
An alternative approach called 'structural modeling' aims to do, for economic data, what Newton did for astronomical data: Provide a deep and rigorous mathematical (or computational) framework that distills the essence of the underlying behavior that produces the 'big data.'
The notebook [_A Gentle Introduction to HARK_](https://mybinder.org/v2/gh/econ-ark/DemARK/main?filepath=notebooks/Gentle-Intro-To-HARK-PerfForesightCRRA.ipynb) details how you can easily utilize our toolkit for structural modeling. Starting with a simple [Perfect Foresight Model](https://en.wikipedia.org/wiki/Rational_expectations) we solve an agent problem, then experiment with adding [income shocks](<https://en.wikipedia.org/wiki/Shock_(economics)>) and changing constructed attributes.
### For Economists: Structural Modeling with HARK
Dissatisfaction with the ability of Representative Agent models to answer important questions raised by the Great Recession has led to a strong movement in the macroeconomics literature toward 'Heterogeneous Agent' models, in which microeconomic agents (consumers; firms) solve a structural problem calibrated to match microeconomic data; aggregate outcomes are derived by explicitly simulating the equilibrium behavior of populations solving such models.
The same kinds of modeling techniques are also gaining popularity among microeconomists, in areas ranging from labor economics to industrial organization. In both macroeconomics and structural micro, the chief barrier to the wide adoption of these techniques has been that programming a structural model has, until now, required a great deal of specialized knowledge and custom software development.
HARK provides a robust, well-designed, open-source toolkit for building such models much more efficiently than has been possible in the past.
Our [_DCEGM Upper Envelope_](https://mybinder.org/v2/gh/econ-ark/DemARK/main?filepath=notebooks%2FDCEGM-Upper-Envelope.ipynb) notebook illustrates using HARK to replicate the [Iskhakov, Jørgensen, Rust, and Schjerning paper](https://onlinelibrary.wiley.com/doi/abs/10.3982/QE643) for solving the discrete-continuous retirement saving problem.
The notebook [_Making Structural Estimates From Empirical Results_](https://mybinder.org/v2/gh/econ-ark/DemARK/main?filepath=notebooks%2FStructural-Estimates-From-Empirical-MPCs-Fagereng-et-al.ipynb) is another demonstration of using HARK to conduct a quick structural estimation based on Table 9 of [_MPC Heterogeneity and Household Balance Sheets_ by Fagereng, Holm, and Natvik](https://www.ssb.no/en/forskning/discussion-papers/_attachment/286054?_ts=158af859c98).
### For Computational Economics Developers
HARK provides a modular and extensible open-source toolkit for solving heterogeneous-agent partial-and general-equilibrium structural models. The code for such models has always been handcrafted, idiosyncratic, poorly documented, and sometimes not generously shared from leading researchers to outsiders. The result being that it can take years for a new researcher to become proficient. By building an integrated system from the bottom up using object-oriented programming techniques and other tools, we aim to provide a platform that will become a focal point for people using such models.
HARK is written in Python, making significant use of libraries such as numpy and scipy which offer a wide array of mathematical and statistical functions and tools. Our modules are generally categorized into Tools (mathematical functions and techniques), Models (particular economic models and solvers) and Applications (use of tools to simulate an economic phenomenon).
For more information on how you can create your own Models or use Tools and Model to create Applications please see the [documentation](https://docs.econ-ark.org/docs/guides/quick_start.html#for-other-developers-of-software-for-computational-economics)
### Contributing to HARK
**We want contributing to Econ-ARK to be fun, enjoyable, and educational for anyone, and everyone.**
Contributions go far beyond pull requests and commits. Although we love giving you the opportunity to put your stamp on HARK, we are also thrilled to receive a variety of other contributions including:
- Documentation updates, enhancements, designs, or bugfixes
- Spelling or grammar fixes
- REAME.md corrections or redesigns
- Adding unit, or functional tests
- [Triaging GitHub issues](https://github.com/econ-ark/HARK/issues?utf8=%E2%9C%93&q=label%3A%E2%80%9DTag%3A+Triage+Needed%E2%80%9D+) -- e.g. pointing out the relevant files, checking for reproducibility
- [Searching for #econ-ark on twitter](https://twitter.com/search?q=econ-ark) and helping someone else who needs help
- Answering questions from StackOverflow tagged with [econ-ark](https://stackoverflow.com/questions/tagged/econ-ark)
- Teaching others how to contribute to HARK
- Blogging, speaking about, or creating tutorials about HARK
- Helping others in our mailing list
If you are worried or don’t know how to start, you can always reach out to us through the gitter [community](https://gitter.im/econ-ark/community)(#tsc-technical-steering-committee) or simply submit [an issue](https://github.com/econ-ark/HARK/issues/new) and a member can help give you guidance!
To install for development see the [Quickstart Guide](https://docs.econ-ark.org/docs/guides/installation.html).
For more information on contributing to HARK please see [the contributing guide](https://docs.econ-ark.org/docs/guides/contributing.html).
This is the guide that collaborators follow in maintaining the Econ-ARK project.
## Disclaimer
This is a beta version of HARK. The code has not been extensively tested as it should be. We hope it is useful, but there are absolutely no guarantees (expressed or implied) that it works or will do what you want. Use at your own risk. And please, let us know if you find bugs by posting an issue to [the GitHub page](https://github.com/econ-ark/HARK)!
## Detailed Explanations and Examples
To help users understand the purpose and features of the repository, we have provided detailed explanations and examples in various sections of the documentation. Here are some key resources:
- [Overview and Examples](https://docs.econ-ark.org/docs/overview/index.html): This section provides an introduction to HARK and includes various examples to help users understand how to use the toolkit.
- [Guides](https://docs.econ-ark.org/docs/guides/index.html): This section includes guides on installation, quick start, and contributing to HARK.
- [Reference](https://docs.econ-ark.org/docs/reference/index.html): This section provides detailed explanations and examples of the various tools and models available in the repository.
For more information and resources, please visit the [Econ-ARK documentation](https://docs.econ-ark.org/).
| text/markdown | null | Econ-ARK team <econ-ark@jhuecon.org> | null | null | null | economics, modelling, modeling, heterogeneity | [
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Financial and Insurance Industry",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Other/Nonlisted Topic",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13"
] | [] | null | null | >=3.10 | [] | [] | [] | [
"interpolation>=2.2.3",
"joblib>=1.2",
"legacy-cgi; python_version >= \"3.13\"",
"matplotlib>=3.6",
"networkx>=3",
"numba",
"numpy",
"optimagic",
"pandas>=1.5",
"pyyaml>=6.0",
"quantecon",
"scipy>=1.10",
"seaborn>=0.12",
"sequence-jacobian",
"statsmodels>=0.14.2",
"xarray>=2023",
"nbval; extra == \"dev\"",
"pre-commit; extra == \"dev\"",
"pytest; extra == \"dev\"",
"pytest-cov; extra == \"dev\"",
"pytest-xdist; extra == \"dev\"",
"ruff; extra == \"dev\"",
"ipython; extra == \"doc\"",
"myst-parser>=2; extra == \"doc\"",
"nbsphinx>=0.8; extra == \"doc\"",
"pydata-sphinx-theme; extra == \"doc\"",
"sphinx>=6.1; extra == \"doc\"",
"sphinx-copybutton; extra == \"doc\"",
"sphinx-design; extra == \"doc\""
] | [] | [] | [] | [
"Homepage, https://github.com/econ-ark/HARK",
"Bug Reports, https://github.com/econ-ark/HARK/issues",
"Documentation, https://econ-ark.github.io/HARK"
] | twine/6.1.0 CPython/3.13.7 | 2026-02-20T18:59:15.455264 | econ_ark-0.17.1.tar.gz | 17,712,083 | 2e/51/952027f2108b050030d325373737c9b607868664c1c0ca637f98776c27bb/econ_ark-0.17.1.tar.gz | source | sdist | null | false | 612ce81752642d308220513f514156ad | 6d347a943cb2cbd9ff0e6a6a88cd4baa8c5962f4b3ddfcab2f39b2b76c0bce66 | 2e51952027f2108b050030d325373737c9b607868664c1c0ca637f98776c27bb | Apache-2.0 | [
"LICENSE"
] | 172 |
2.4 | runestone | 7.11.15 | Sphinx extensions for writing interactive documents. | Packaging of the Runestone components for publishing educational materials using Sphinx and restructuredText. Check out the `Overview <https://runestone.academy/ns/books/published/overview/overview.html>`_ To see all of the extensions in action.
Runestone Version 7
-------------------
**Important** May 2023 moved RunestoneComponents repository to a new monorepo for the whole project.
To build a release of runestone including the javascript for the interactive components, use the build.py script in this folder.
.. code-block:: bash
python build.py
To build a release and publish that release to PyPI use the ``--publish`` option
.. code-block:: bash
python build.py --publish
The publish option assumes you have the credentials to publish on pyPI, as well as credentials for the runestone load balancer.
Documentation
-------------
Writing **new** books using the Runestone RST markup language is deprecated as of Summer 2022. It is strongly recommended that you use the `PreTeXt <https://pretextbook.org>`_ markup language for writing new books.
* Take a look at the `Sample Book <https://pretextbook.org/examples/sample-book/annotated/sample-book.html>` Especially Chapter 3, the section titled Interactive Exercises. The activecode, CodeLens and all the rest of the interactives that you see in that sample book are powered by the components in this repository. This repository will remain the home of those interctive components.
* Take a look at the `PreTeXt Guide <https://pretextbook.org/doc/guide/html/guide-toc.html>`_ It contains comprehensive documentation on writing in PreTeXt.
* As an Author you will want to use the PreTeXt CLI for writing books. Experienced Runestone authors will find the pretext cli to be quite familiar, but better organized with fewer mysterious configuration files. See `PreTeXt-CLI <https://pretextbook.org/doc/guide/html/guide-toc.html>`
Quick Start
-----------
* ``pip install pretext``
* Create a folder for your book project then run
* ``pretext new`` to create a new book.
Old Documentation
-----------------
I will keep this around for a while during the transition to PreTeXt.
To get started with Runestone restructuredText as the markup language:
* ``pip install runestone``
To start a project, create a new folder and then run the following command (installed by pip) in that new folder ``runestone init`` For example:
.. code-block:: bash
mkdir myproject
cd myproject
runestone init
The init command will ask you some questions and setup a default project for you. The default response is in square brackets, example ``[false]``.
To build the included default project run
.. code-block:: bash
runestone build
*Note:* If you come across version conflict with ``six`` library while building the project, ``pip install --ignore-installed six`` command might be useful.
You will now have a build folder with a file index.html in it, along with some default content. The contents of the build folder are suitable for hosting anywhere that you can serve static web content from! For a small class you could even serve the content using the provided Python webserver:
.. code-block:: bash
$ runestone serve
Now from your browser you can open up ``http://localhost:8000/index.html`` You should see the table of contents for a sample page like this:
.. image:: images/runeCompo-index.png
:width: 370
If you edit ``_sources/index.html`` or ``_sources/overview.rst`` and then rebuild and serve again you will see your changes. The best documentation is probably the overview.rst file itself, as it demonstrates how to use all of the common components and shows most of their options.
**Windows Users** I have tested the installation, along with init, build, and serve on Windows 8.1.
The biggest pain is probably setting your PATH environment variable so you can simply type the commands
from the shell. Please note that I am not a regular user of windows, I only test things on my VMWare
installation every so often. If you are new to using Python on windows I recommend you check out this
link on `Using Python with Windows <https://docs.python.org/3.4/using/windows.html>`_
Developing and Hacking
----------------------
So, you would like to help out with developing the Runestone Components. Great We welcome all the help we can get. There is plenty to do no matter what your experience level. There are a couple of prerequisites.
1. You will need a version of Python, I currently develop on 3.9 or higher, but test on 3.8 and later.
2. You will need nodejs and npm as well since there is a LOT of Javascript code in the components.
To get everything set up do the following
1. Make a Fork of this repository. and ``git clone`` the repository to your development machine.
2. Install `Poetry <https://python-poetry.org/docs/>`_
3. From the top level RunestoneComponents folder run ``npm install`` this will install the packaging tools that are needed for Javascript development. ``npm run`` gives you a list of commands The key command is ``npm run build`` this will combine all of the Javascript and CSS files for all the components into a single runestone.js file. If you are doing some really deep development and want to avoid building a book, you can put your html in public/index.html and use the ``npm run start`` command. This will automatically rebuild runestone.js and refresh the webpage every time you save a change.
4. When you have some changes to share, make a Pull Request.
(See the RunestoneServer repository and **http://runestoneinteractive.org** for more complete documentation on how this project works.)
Code Style
----------
We use ``black`` to automatically style Python. You can set up your editor to automatically run black whenever you save, or you can run it manually.
We use ``prettier`` to automatically style Javascript.
Run ``jshint`` on your code we have some options configured for this project.
Writing Tests
-------------
A great way to contribute to the Runestone Components repository is to add to our test suite.
Our goal is to have unit tests which rely on Selenium (a library that helps simulate interactions in a web browser) for each directive, to see if the JavaScript that powers the directives is working correctly.
**In order to get started with writing a test/writing additional tests, you will need the following:**
* Download the latest `ChromeDriver <https://chromedriver.storage.googleapis.com/index.html>`_., which is a driver that simulates Google Chrome.
* On linux you will need to install Xvfb ``apt-get install xvfb``
* You'll also need to have done the above installation.
* We have converted to using poetry for our dependency management. To run `runestone` while in development mode `poetry run runestone ...` OR you can run `poetry shell` to start up a shell with a virtual environment activated.
**To run tests:**
* Make sure the directory containing the ChromeDriver executable is in your ``PATH`` environment variable. e.g. ``PATH=$PATH:path/to/chromedriver`` at your command line (or edit your ``.bash_profile``).
* Check out the existing tests, e.g. the ``test_question.py`` file that tests the Question directive, which you can find at the path ``/runestone/question/test/test_question.py``, for an example.
* Each directive's individual set of tests requires a mini book. You'll see a ``_sources`` folder for each existing test containing an ``index.rst`` file. That file contains a title, as required by ``.rst``, and whatever directive examples you want to test.
* Finally, to run a test, ensuring that you have accessed a directive folder, type the following at the command prompt:
* ``poetry run pytest``
Running pytest from the main directory will run all the tests. To run a single test you can navigate to the
directory of the test, or you can run ``poetry run pytest -k XXX`` where XXX is a substring that matches some part of
the test functions name.
.. note::
8081 is the default test port.
If you are running another server on this port, you may encounter an error.
See the Python files, e.g. ``test_question.py``, to see how this is set up.
You should then see some test output, showing a pass (``ok``), FAIL, or error(s).
If you have an error relating to PhantomJS/a driver in the output, you probably have a PATH or driver installation problem.
**To write a new test:**
* Create a ``test`` directory inside a directive's folder
* Create a Python file to hold the test suite inside that directory, e.g. ``test_directivename.py``
* Run ``runestone init`` inside that folder and answer the following prompts
* Write the appropriate directive example(s) inside the ``index.rst`` file (which will be created as a result of ``runestone init``)
* Edit the Python file you created as appropriate (see documentation for the Python ``unittest`` module `In the Python docs <https://docs.python.org/2/library/unittest.html>`_.)
Notes for more Advanced Users
-----------------------------
If you already have an existing `Sphinx <http://sphinx-doc.org>`_ project and you want to incorporate the runestone components into your project you can just make a couple of simple edits to your existing ``conf.py`` file.
* First add the following import line ``from runestone import runestone_static_dirs, runestone_extensions``
* Then modify your extensions. You may have a different set of extensions already enabled, but it doesn't matter just do this: ``extensions = ['sphinx.ext.mathjax'] + runestone_extensions()``
* Then modify your html_static_path: ``html_static_path = ['_static'] + runestone_static_dirs()`` Again you may have your own set of static paths in the initial list.
See https://github.com/bnmnetp/runestone/wiki/DevelopmentRoadmap to get a sense for how this is all going to come together.
Researchers
-----------
If you use Runestone in your Research or write about it, please reference ``https://runestone.academy`` and cite this paper:
.. code-block:: bibtex
@inproceedings{Miller:2012:BPE:2325296.2325335,
author = {Miller, Bradley N. and Ranum, David L.},
title = {Beyond PDF and ePub: Toward an Interactive Textbook},
booktitle = {Proceedings of the 17th ACM Annual Conference on Innovation and Technology in Computer Science Education},
series = {ITiCSE '12},
year = {2012},
isbn = {978-1-4503-1246-2},
location = {Haifa, Israel},
pages = {150--155},
numpages = {6},
url = {http://doi.acm.org/10.1145/2325296.2325335},
doi = {10.1145/2325296.2325335},
acmid = {2325335},
publisher = {ACM},
address = {New York, NY, USA},
keywords = {cs1, ebook, sphinx},
}
| text/x-rst | Brad Miller | bonelake@mac.com | null | null | GPL | runestone, sphinx, ebook, oer, education | [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Environment :: Plugins",
"Environment :: Web Environment",
"Framework :: Sphinx :: Extension",
"Intended Audience :: Education",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"License :: Other/Proprietary License",
"Operating System :: MacOS",
"Operating System :: Unix",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Topic :: Education",
"Topic :: Text Processing :: Markup"
] | [] | null | null | <4.0.0,>=3.10.0 | [] | [] | [] | [
"CodeChat==1.9.3",
"Paver>=1.2.4",
"SQLAlchemy<3.0.0,>=2.0.0",
"Sphinx<6.0.0,>=5.0.0",
"aiosqlite>=0.18.0",
"asyncpg<0.31.0,>=0.30.0",
"click<9,>=8",
"cogapp>=2.5",
"cryptography<4.0.0,>=3.0.0",
"dateutils<0.7.0,>=0.6.12",
"fastapi<0.116.0,>=0.115.0",
"greenlet<4.0.0,>=3.0.0",
"ipyleaflet<0.20.0,>=0.19.2",
"jinja2<4.0.0,>=3.1.0",
"json2xml<4.0.0,>=3.21.0",
"jupyter-sphinx<0.5",
"jupyterlab<5.0.0,>=4.2.4",
"jupyterlite-sphinx<0.10.0,>=0.9.3",
"lxml<7.0,>=6.0",
"myst-parser<2.0.0,>=1.0.0",
"pretext<3.0.0,>=2.35.0",
"psycopg2-binary<3.0.0,>=2.9.6",
"pydal>=20230521.1",
"pydantic<3.0.0,>=2.0.0",
"pydantic-settings<3.0.0,>=2.0.3",
"pyhumps<4.0.0,>=3.8.0",
"python-dotenv<2.0.0,>=1.0.0",
"scikit-learn<2.0.0,>=1.5.1",
"six>1.12",
"sphinx-reredirects<0.2.0,>=0.1.2",
"sphinxcontrib-paverutils>=1.18.1",
"toml<0.11.0,>=0.10.2"
] | [] | [] | [] | [
"Documentation, https://runestone-monorepo.readthedocs.io/en/latest/index.html",
"Repository, https://github.com/RunestoneInteractive/rs"
] | poetry/2.3.2 CPython/3.10.19 Darwin/25.3.0 | 2026-02-20T18:59:13.280303 | runestone-7.11.15-py3-none-any.whl | 15,809,679 | 11/02/e9327d5f31bccfdbc4e9aa04dcbfafac494cfdd5988b64fcef5b2745a822/runestone-7.11.15-py3-none-any.whl | py3 | bdist_wheel | null | false | 739c5b4bfa2ceea85cb2aa29cbd8e38c | 948235132761b589eb79be0fd06bcc524959999c8eea8105384657e1f31f2032 | 1102e9327d5f31bccfdbc4e9aa04dcbfafac494cfdd5988b64fcef5b2745a822 | null | [] | 186 |
2.4 | GenTS | 0.9.5 | A useful tool for post-processing Earth System Model output 'history files' into the time series format. | # **Gen**erate **T**ime **S**eries (GenTS)
[](https://pypi.org/project/GenTS/)
[](https://gents.readthedocs.io/en/latest/)

The GenTS (Generate Time Series) is an open-source Python Package designed to simplify the post-processing of history files into time series files. This package includes streamlined functions that require minimal input to operate and a documented API for custom workflows.
## Installation
GenTS can be installed using `pip`:
```
pip install gents['parallel']
```
Although it is reccomended to use the Dask implementation, you may wish to implement your own parallel solution for large datasets. If you then don't want to include Dask in your installation, you may omit `['parallel']` from the command (this limits GenTS to only run in serial).
To install from source, please view the [ReadTheDocs Documentation](https://gents.readthedocs.io/en/latest/).
## Example
Barebones starting example:
```
from gents.hfcollection import HFCollection
from gents.timeseries import TSCollection
from dask.distributed import LocalCluster, Client
cluster = LocalCluster(n_workers=30, threads_per_worker=1, memory_limit="2GB")
client = cluster.get_client()
input_head_dir = "... case directory with model output ..."
output_head_dir = "... scratch directory to output time series to ..."
hf_collection = HFCollection(input_head_dir)
hf_collection = hf_collection.include_patterns(["*/atm/*", "*/ocn/*", "*.h4.*"])
hf_collection.pull_metadata()
ts_collection = TSCollection(hf_collection.include_years(0, 5), output_head_dir)
ts_collection = ts_collection.apply_overwrite("*")
ts_collection.execute()
```
The serial equivalent (without Dask) is the same, just without the Dask `Client` or `LocalCluster`:
```
from gents.hfcollection import HFCollection
from gents.timeseries import TSCollection
input_head_dir = "... case directory with model output ..."
output_head_dir = "... scratch directory to output time series to ..."
hf_collection = HFCollection(input_head_dir)
hf_collection = hf_collection.include_patterns(["*/atm/*", "*/ocn/*", "*.h4.*"])
hf_collection.pull_metadata()
ts_collection = TSCollection(hf_collection.include_years(0, 5), output_head_dir)
ts_collection = ts_collection.apply_overwrite("*")
ts_collection.execute()
```
## Contributor/Bug Reporting Guidelines
Please report all issues to the [GitHub issue tracker](https://github.com/AgentOxygen/GenTS/issues). When submitting a bug, run `gents.utils.enable_logging(verbose=True)` at the top of your script to include all log output. This will aid in reproducing the bug and quickly developing a solution.
For development, it is recommended to use the [Docker method for testing](https://gents.readthedocs.io/en/latest/). These tests are automatically run in the GitHub workflow, but should be run before committing changes.
| text/markdown | null | Cameron Cummins <cameron.cummins@utexas.edu> | null | null | null | null | [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent"
] | [] | null | null | >=3.10.13 | [] | [] | [] | [
"numpy",
"netcdf4",
"cftime",
"dask[distributed]; extra == \"parallel\""
] | [] | [] | [] | [
"Homepage, https://github.com/AgentOxygen/GenTS",
"Issues, https://github.com/AgentOxygen/GenTS"
] | twine/6.2.0 CPython/3.9.25 | 2026-02-20T18:59:07.741374 | gents-0.9.5.tar.gz | 138,074 | 68/48/825d6afce05881152982a0f2a7668e820c3552f8310b2e44ea74f3dcd8b1/gents-0.9.5.tar.gz | source | sdist | null | false | 7b99fbfc2e0f7a7408f7d4a0372c8563 | 0e201796c05ec973bcb2875969ee5d0ffbded3e7ac04bd8f9922ce664b01210d | 6848825d6afce05881152982a0f2a7668e820c3552f8310b2e44ea74f3dcd8b1 | null | [
"LICENSE"
] | 0 |
2.4 | cowarp | 0.1.8 | Correlation Optimized Warping (COW) algorithm for signal alignment | ## 📘 Cowarp – Correlation Optimized Warping in Python
**Cowarp** is a Python implementation of an alignment method called Correlation Optimized Warping (COW). This technique is widely used in spectroscopy, chromatography, and other analytical fields to align signals that may have local time shifts or distortions. COW aligns one signal (sample) to another (reference) by segmenting the signals and warping segments to maximize correlation.
This is the initial release of the package. It currently includes a single implementation of the COW algorithm, in which the sample signal endpoints remain fixed (i.e., not subject to warping).

## 🛠️ Installation
```markdown
pip install cowarp
```
## 🚀 Basic Usage
```markdown
import numpy as np
from cowarp import warp
# Example reference and sample signals
reference = np.sin(np.linspace(0, 2 * np.pi, n))
sample = np.sin(np.linspace(0, 2 * np.pi, n) + 0.5)
# Run Correlation Optimized Warping
aligned_sample, corr = warp(reference, sample, num_intervals=5, slack=8)
```
## ⚙️ Function Signature
```markdown
warp(
reference,
sample,
num_intervals=None,
interval_length=None,
slack=None,
min_interval_length=None,
return_details=False,
verbose=False
)
```
## 📚 Parameters
| Parameter | Type | Description |
| --------------------- | ------------------- | ----------------------------------------------------------------------------------------- |
| `reference` | array-like | Reference (target) 1D signal to align against. |
| `sample` | array-like | Sample signal to be warped and aligned to the reference. Currently supports only 1D signals. |
| `num_intervals` | int, optional | Number of intervals to divide the signal into. Mutually exclusive with `interval_length`. |
| `interval_length` | int, optional | Length of each interval. Alternative to `num_intervals`. |
| `slack` | int, optional | Maximum allowed deviation (shift) in interval boundary positions. |
| `min_interval_length` | int, optional | Minimum length allowed for any interval. Default: 3. |
| `return_details` | bool, default=False | If True, returns additional details (e.g., warp path). |
| `verbose` | bool, default=False | If True, prints internal decisions and computed values. |
## 📤 Returns
Depending on `return_details`:
- If `False` returns a tuple:
`(warped_sample, correlation)`
- `warped_sample` : np.ndarray
The warped (aligned ) version of `sample`, aligned to the same length as `reference`.
- `correlation` : final_correlation : float
Pearson correlation coefficient between `reference` and `warped_sample`.
- If `True` returns a dictionary:
```markdown
{
"warped_sample": np.ndarray,
"correlation": float,
"warping_path": list[int],
"boundaries": list[int],
}
```
- `warping_path`
List of boundary indices in the sample signal defining the intervals
that correspond to the fixed reference intervals.
The length of this list is equal to num_intervals + 1.
- `boundaries`
List of fixed interval boundaries in the reference signal. The length of this list is equal to num_intervals + 1.
## 🧠 Example
```markdown
"""
Example: Aligning Chromatographic Signals using COW
This example demonstrates how to use the COW (Correlation Optimized Warping)
algorithm to align two chromatographic signals. The sample chromatogram
contains nonlinear time shifts and noise relative to the reference.
"""
import numpy as np
import matplotlib.pyplot as plt
from cowarp import warp
def generate_chromatogram(num_points=400, random_shift=False, noise_level=0.01):
x = np.linspace(0, 100, num_points)
# Define ideal peaks
peaks = [15, 35, 55, 75]
widths = [2.5, 3.5, 2.5, 3.0]
amplitudes = [1.0, 0.9, 1.2, 0.8]
y = np.zeros_like(x)
for i, (mu, sigma, amp) in enumerate(zip(peaks, widths, amplitudes)):
if random_shift:
mu += np.random.uniform(-3.0, 3.0) # stronger shift
y += amp * np.exp(-0.5 * ((x - mu) / sigma) ** 2)
# Add small baseline and noise
y += 0.05 + noise_level * np.random.randn(num_points)
return x, y
# --- Generate reference and sample chromatograms ---
# Reference chromatogram
x_ref, reference = generate_chromatogram(num_points=500, random_shift=False, noise_level=0.005)
# Sample chromatogram (more strongly shifted and noisier)
x_samp, sample = generate_chromatogram(num_points=480, random_shift=True, noise_level=0.02)
# --- Perform COW alignment ---
result_dict = warp(
reference,
sample,
num_intervals=10,
slack=25,
min_interval_length=4,
return_details=True,
verbose=True
)
warped_sample = result_dict['warped_sample']
final_corr = result_dict['correlation']
warping_path = result_dict['warping_path']
boundaries = result_dict['boundaries']
print(f"Final correlation after warping: {final_corr:.4f}")
# --- Plot results ---
plt.figure(figsize=(10, 7))
plt.subplot(2, 1, 1)
plt.plot(x_ref, reference, label="Reference", linewidth=2)
plt.plot(x_samp, sample, label="Sample (before warping)", linestyle="--")
plt.title("Before COW Alignment")
plt.xlabel("Time")
plt.ylabel("Intensity")
plt.legend()
plt.grid(True)
plt.subplot(2, 1, 2)
plt.plot(x_ref, reference, label="Reference", linewidth=2)
plt.plot(np.linspace(0, 100, len(warped_sample)), warped_sample, label="Sample (after warping)", linestyle="--")
plt.title(f"After COW Alignment (Correlation = {final_corr:.4f})")
plt.xlabel("Time")
plt.ylabel("Intensity")
plt.legend()
plt.grid(True)
plt.tight_layout()
plt.show()
```
The resulting plot is given below.

## 🧾 License
This project is licensed under the MIT License.
## ✍️ Author
Guram Chaganava
Electrical & Electronics Engineer | Machine Learning Enthusiast
[LinkedIn](https://www.linkedin.com/in/guram-chaganava/)
| text/markdown | null | Guram Chaganava <guram58chaganava@gmail.com> | null | null | null | signal processing, time series, warping, alignment, COW | [] | [] | null | null | >=3.8 | [] | [] | [] | [
"numpy>=1.20"
] | [] | [] | [] | [
"Homepage, https://github.com/G93-7/Cowarp",
"Documentation, https://github.com/G93-7/Cowarp#readme"
] | twine/6.2.0 CPython/3.9.13 | 2026-02-20T18:58:50.063508 | cowarp-0.1.8.tar.gz | 16,508 | 7a/15/c966318aa6f3c333f44a5dfd94ea8f4d7b86298dd6e7ebeb1fe73c4e8d1d/cowarp-0.1.8.tar.gz | source | sdist | null | false | 90243bad2920b9b37530c4d7e45942f7 | 5dc3dd4201384ef1c6d48fe981764633f98fc69fe01cab7080840174f83ae559 | 7a15c966318aa6f3c333f44a5dfd94ea8f4d7b86298dd6e7ebeb1fe73c4e8d1d | MIT | [
"LICENSE"
] | 166 |
2.4 | dagster-pandas | 0.28.15 | Utilities and examples for working with pandas and dagster, an opinionated framework for expressing data pipelines | # dagster-pandas
The docs for `dagster-pandas` can be found
[here](https://docs.dagster.io/integrations/libraries/pandas/dagster-pandas).
| text/markdown | null | Dagster Labs <hello@dagsterlabs.com> | null | null | null | null | [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Operating System :: OS Independent"
] | [] | null | null | <3.15,>=3.10 | [] | [] | [] | [
"dagster==1.12.15",
"pandas<3.0.0"
] | [] | [] | [] | [
"Homepage, https://github.com/dagster-io/dagster"
] | twine/6.2.0 CPython/3.12.12 | 2026-02-20T18:58:45.044841 | dagster_pandas-0.28.15.tar.gz | 20,844 | fc/97/a5f446536472334833201a330b87edcab4078e37f4067f7238460233adc5/dagster_pandas-0.28.15.tar.gz | source | sdist | null | false | 0705b982d0ec0ebb89a5e1229d0ecbaf | 5446ab84e05906bb31c88a97268b7e317c3ca33195b3ae444ca47724eafbfabe | fc97a5f446536472334833201a330b87edcab4078e37f4067f7238460233adc5 | Apache-2.0 | [
"LICENSE"
] | 1,813 |
2.4 | django-annotator | 2.2.15 | Implementation of annotatorjs's Storage/Search API. | # `django-annotator`
Django implementation of [annotatorjs Storage](http://annotatorjs.org/).
Implements most of the methods as per the
[Core Storage/Search API](http://docs.annotatorjs.org/en/v1.2.x/storage.html#core-storage-api)
documentation (`root`, `index`, `create`, `read`, `update`,`delete` and
`search`).
To see a working demo:
```sh
poetry install
poetry run python3 ./demo.py
```
This will run the tests, after which a demo. page will be available at `/demo`.
## Installation
The package can be installed via `poetry`:
```sh
poetry add django-annotator
```
Following installation it can be added to any Django project by updating the
`INSTALLED_APPS`, along with its dependencies:
```python
INSTALLED_APPS = (
...
"rest_framework",
"django_filters",
"annotator",
)
```
As per the integration
[documentation](https://django-filter.readthedocs.io/en/latest/guide/rest_framework.html)
for `django-filter`, `DEFAULT_FILTER_BACKENDS` must also be added to
`settings.py`:
```python
REST_FRAMEWORK = {
"DEFAULT_FILTER_BACKENDS": (
"django_filters.rest_framework.DjangoFilterBackend",
),
},
```
Then run `migrate` to include the new tables from `django-annotator`:
```sh
poetry run python3 ./manage.py migrate
```
## Annotator
The package relies on *Annotator* being installed in your project—see the
[documentation](http://docs.annotatorjs.org/en/v1.2.x/getting-started.html) for
details of its inclusion.
## Settings
As per Annotator's documentation, the
[root](http://docs.annotatorjs.org/en/v1.2.x/storage.html#root) endpoint will
return information in the format:
```json
{
"name": "django-annotator-store",
"version": "2.1.0"
}
```
The `name` returned can be configured by setting `ANNOTATOR_NAME` in your
`settings` (defaulting to the above).
## `django-cors-headers`
If you have any issues with *Cross-origin resource sharing (CORS)*, consider
installing
[`django-cors-headers`](https://github.com/ottoyiu/django-cors-headers).
| text/markdown | PsypherPunk | psypherpunk@gmail.com | null | null | Apache-2.0 | null | [
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14"
] | [] | null | null | <4.0,>=3.10 | [] | [] | [] | [
"django-filter<25.0,>=24.2",
"djangorestframework<4.0.0,>=3.15.2",
"drf-writable-nested<0.8.0,>=0.7.0"
] | [] | [] | [] | [] | twine/6.1.0 CPython/3.13.7 | 2026-02-20T18:58:44.045436 | django_annotator-2.2.15.tar.gz | 90,372 | 18/9d/b83c96bdd2393be4e13886b58cfd4f99bf74b1cb5c4b2b297c4a045feae8/django_annotator-2.2.15.tar.gz | source | sdist | null | false | ec993944c815ee9108f778d59bcc220e | c63c2025547cee85dffb32d9a5a3fdf5379801968ced297b6a94ecae7143e406 | 189db83c96bdd2393be4e13886b58cfd4f99bf74b1cb5c4b2b297c4a045feae8 | null | [
"LICENSE"
] | 159 |
2.4 | pytest-seleniumbase | 4.47.0 | A complete web automation framework for end-to-end testing. | **[<img src="https://img.shields.io/badge/pypi-pytest--seleniumbase-22AAEE.svg" alt="pypi" />](https://pypi.python.org/pypi/pytest-seleniumbase) is a proxy for [<img src="https://img.shields.io/badge/pypi-seleniumbase-22AAEE.svg" alt="pypi" />](https://pypi.python.org/pypi/seleniumbase)**
****
<!-- SeleniumBase Docs -->
<meta property="og:site_name" content="SeleniumBase">
<meta property="og:title" content="SeleniumBase: Python Web Automation and E2E Testing" />
<meta property="og:description" content="Fast, easy, and reliable Web/UI testing with Python." />
<meta property="og:keywords" content="Python, pytest, selenium, webdriver, testing, automation, seleniumbase, framework, dashboard, recorder, reports, screenshots">
<meta property="og:image" content="https://seleniumbase.github.io/cdn/img/mac_sb_logo_5b.png" />
<link rel="icon" href="https://seleniumbase.github.io/img/logo7.png" />
<h1>SeleniumBase</h1>
<p align="center"><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.github.io/cdn/img/super_logo_sb3.png" alt="SeleniumBase" title="SeleniumBase" width="350" /></a></p>
<p align="center" class="hero__title"><b>All-in-one Browser Automation Framework:<br />Web Crawling / Testing / Scraping / Stealth</b></p>
<p align="center"><a href="https://pypi.python.org/pypi/seleniumbase" target="_blank"><img src="https://img.shields.io/pypi/v/seleniumbase.svg?color=3399EE" alt="PyPI version" /></a> <a href="https://github.com/seleniumbase/SeleniumBase/releases" target="_blank"><img src="https://img.shields.io/github/v/release/seleniumbase/SeleniumBase.svg?color=22AAEE" alt="GitHub version" /></a> <a href="https://seleniumbase.io"><img src="https://img.shields.io/badge/docs-seleniumbase.io-11BBAA.svg" alt="SeleniumBase Docs" /></a> <a href="https://github.com/seleniumbase/SeleniumBase/actions" target="_blank"><img src="https://github.com/seleniumbase/SeleniumBase/workflows/CI%20build/badge.svg" alt="SeleniumBase GitHub Actions" /></a> <a href="https://discord.gg/EdhQTn3EyE" target="_blank"><img src="https://img.shields.io/badge/join-discord-infomational" alt="Join the SeleniumBase chat on Discord"/></a></p>
<p align="center">
<a href="#python_installation">🚀 Start</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/features_list.md">🏰 Features</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/customizing_test_runs.md">🎛️ Options</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/ReadMe.md">📚 Examples</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/console_scripts/ReadMe.md">🌠 Scripts</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/mobile_testing.md">📱 Mobile</a>
<br />
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/method_summary.md">📘 APIs</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md"> 🔠 Formats</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/recorder_mode.md">🔴 Recorder</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/example_logs/ReadMe.md">📊 Dashboard</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/locale_codes.md">🗾 Locales</a> |
<a href="https://seleniumbase.io/devices/?url=seleniumbase.com">💻 Farm</a>
<br />
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/commander.md">🎖️ GUI</a> |
<a href="https://seleniumbase.io/demo_page">📰 TestPage</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/uc_mode.md">👤 UC Mode</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/ReadMe.md">🐙 CDP Mode</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/chart_maker/ReadMe.md">📶 Charts</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/utilities/selenium_grid/ReadMe.md">🌐 Grid</a>
<br />
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/how_it_works.md">👁️ How</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/tree/master/examples/migration/raw_selenium">🚝 Migrate</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/case_plans.md">🗂️ CasePlans</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/tree/master/examples/boilerplates">♻️ Template</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/master_qa/ReadMe.md">🧬 Hybrid</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/tour_examples/ReadMe.md">🚎 Tours</a>
<br />
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/github/workflows/ReadMe.md">🤖 CI/CD</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/js_package_manager.md">🕹️ JSMgr</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/translations.md">🌏 Translator</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/presenter/ReadMe.md">🎞️ Presenter</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/dialog_boxes/ReadMe.md">🛂 Dialog</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/visual_testing/ReadMe.md">🖼️ Visual</a>
<br />
</p>
<p>SeleniumBase is the professional toolkit for web automation activities. Built for testing websites, bypassing CAPTCHAs, enhancing productivity, completing tasks, and scaling your business.</p>
--------
📚 Learn from [**over 200 examples** in the **SeleniumBase/examples/** folder](https://github.com/seleniumbase/SeleniumBase/tree/master/examples).
🐙 Note that <a translate="no" href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/uc_mode.md"><b>UC Mode</b></a> / <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/ReadMe.md"><b>CDP Mode</b></a> (Stealth Mode) have their own ReadMe files.
ℹ️ Most scripts run with raw <code translate="no"><b>python</b></code>, although some scripts use <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md">Syntax Formats</a> that expect <a href="https://docs.pytest.org/en/latest/how-to/usage.html" translate="no"><b>pytest</b></a> (a Python unit-testing framework included with SeleniumBase that can discover, collect, and run tests automatically).
--------
<p align="left">📗 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_google.py">raw_google.py</a>, which performs a Google search:</p>
```python
from seleniumbase import SB
with SB(test=True, uc=True) as sb:
sb.open("https://google.com/ncr")
sb.type('[title="Search"]', "SeleniumBase GitHub page\n")
sb.click('[href*="github.com/seleniumbase/"]')
sb.save_screenshot_to_logs() # ./latest_logs/
print(sb.get_page_title())
```
> `python raw_google.py`
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_google.py"><img src="https://seleniumbase.github.io/cdn/gif/google_search.gif" alt="SeleniumBase Test" title="SeleniumBase Test" width="420" /></a>
--------
<p align="left">📗 Here's an example of bypassing Cloudflare's challenge page: <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/raw_gitlab.py">SeleniumBase/examples/cdp_mode/raw_gitlab.py</a></p>
```python
from seleniumbase import SB
with SB(uc=True, test=True, locale="en") as sb:
url = "https://gitlab.com/users/sign_in"
sb.activate_cdp_mode(url)
sb.uc_gui_click_captcha()
sb.sleep(2)
```
<img src="https://seleniumbase.github.io/other/cf_sec.jpg" title="SeleniumBase" width="332"> <img src="https://seleniumbase.github.io/other/gitlab_bypass.png" title="SeleniumBase" width="288">
--------
<p align="left">📗 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_get_swag.py">test_get_swag.py</a>, which tests an e-commerce site:</p>
```python
from seleniumbase import BaseCase
BaseCase.main(__name__, __file__) # Call pytest
class MyTestClass(BaseCase):
def test_swag_labs(self):
self.open("https://www.saucedemo.com")
self.type("#user-name", "standard_user")
self.type("#password", "secret_sauce\n")
self.assert_element("div.inventory_list")
self.click('button[name*="backpack"]')
self.click("#shopping_cart_container a")
self.assert_text("Backpack", "div.cart_item")
self.click("button#checkout")
self.type("input#first-name", "SeleniumBase")
self.type("input#last-name", "Automation")
self.type("input#postal-code", "77123")
self.click("input#continue")
self.click("button#finish")
self.assert_text("Thank you for your order!")
```
> `pytest test_get_swag.py`
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_get_swag.py"><img src="https://seleniumbase.github.io/cdn/gif/fast_swag_2.gif" alt="SeleniumBase Test" title="SeleniumBase Test" width="480" /></a>
> (The default browser is ``--chrome`` if not set.)
--------
<p align="left">📗 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_coffee_cart.py" target="_blank">test_coffee_cart.py</a>, which verifies an e-commerce site:</p>
```bash
pytest test_coffee_cart.py --demo
```
<p align="left"><a href="https://seleniumbase.io/coffee/" target="_blank"><img src="https://seleniumbase.github.io/cdn/gif/coffee_cart.gif" width="480" alt="SeleniumBase Coffee Cart Test" title="SeleniumBase Coffee Cart Test" /></a></p>
> <p>(<code translate="no">--demo</code> mode slows down tests and highlights actions)</p>
--------
<a id="multiple_examples"></a>
<p align="left">📗 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_demo_site.py" target="_blank">test_demo_site.py</a>, which covers several actions:</p>
```bash
pytest test_demo_site.py
```
<p align="left"><a href="https://seleniumbase.io/demo_page" target="_blank"><img src="https://seleniumbase.github.io/cdn/gif/demo_page_5.gif" width="480" alt="SeleniumBase Example" title="SeleniumBase Example" /></a></p>
> Easy to type, click, select, toggle, drag & drop, and more.
(For more examples, see the <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/ReadMe.md">SeleniumBase/examples/</a> folder.)
--------
<p align="left"><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.github.io/cdn/img/super_logo_sb3.png" alt="SeleniumBase" title="SeleniumBase" width="232" /></a></p>
<blockquote>
<p dir="auto"><strong>Explore the README:</strong></p>
<ul dir="auto">
<li><a href="#install_seleniumbase" ><strong>Get Started / Installation</strong></a></li>
<li><a href="#basic_example_and_usage"><strong>Basic Example / Usage</strong></a></li>
<li><a href="#common_methods" ><strong>Common Test Methods</strong></a></li>
<li><a href="#fun_facts" ><strong>Fun Facts / Learn More</strong></a></li>
<li><a href="#demo_mode_and_debugging"><strong>Demo Mode / Debugging</strong></a></li>
<li><a href="#command_line_options" ><strong>Command-line Options</strong></a></li>
<li><a href="#directory_configuration"><strong>Directory Configuration</strong></a></li>
<li><a href="#seleniumbase_dashboard" ><strong>SeleniumBase Dashboard</strong></a></li>
<li><a href="#creating_visual_reports"><strong>Generating Test Reports</strong></a></li>
</ul>
</blockquote>
--------
<details>
<summary> ▶️ How is <b>SeleniumBase</b> different from raw Selenium? (<b>click to expand</b>)</summary>
<div>
<p>💡 SeleniumBase is a Python framework for browser automation and testing. SeleniumBase uses <a href="https://www.w3.org/TR/webdriver2/#endpoints" target="_blank">Selenium/WebDriver</a> APIs and incorporates test-runners such as <code translate="no">pytest</code>, <code translate="no">pynose</code>, and <code translate="no">behave</code> to provide organized structure, test discovery, test execution, test state (<i>eg. passed, failed, or skipped</i>), and command-line options for changing default settings (<i>eg. browser selection</i>). With raw Selenium, you would need to set up your own options-parser for configuring tests from the command-line.</p>
<p>💡 SeleniumBase's driver manager gives you more control over automatic driver downloads. (Use <code translate="no">--driver-version=VER</code> with your <code translate="no">pytest</code> run command to specify the version.) By default, SeleniumBase will download a driver version that matches your major browser version if not set.</p>
<p>💡 SeleniumBase automatically detects between CSS Selectors and XPath, which means you don't need to specify the type of selector in your commands (<i>but optionally you could</i>).</p>
<p>💡 SeleniumBase methods often perform multiple actions in a single method call. For example, <code translate="no">self.type(selector, text)</code> does the following:<br />1. Waits for the element to be visible.<br />2. Waits for the element to be interactive.<br />3. Clears the text field.<br />4. Types in the new text.<br />5. Presses Enter/Submit if the text ends in <code translate="no">"\n"</code>.<br />With raw Selenium, those actions require multiple method calls.</p>
<p>💡 SeleniumBase uses default timeout values when not set:<br />
✅ <code translate="no">self.click("button")</code><br />
With raw Selenium, methods would fail instantly (<i>by default</i>) if an element needed more time to load:<br />
❌ <code translate="no">self.driver.find_element(by="css selector", value="button").click()</code><br />
(Reliable code is better than unreliable code.)</p>
<p>💡 SeleniumBase lets you change the explicit timeout values of methods:<br />
✅ <code translate="no">self.click("button", timeout=10)</code><br />
With raw Selenium, that requires more code:<br />
❌ <code translate="no">WebDriverWait(driver, 10).until(EC.element_to_be_clickable("css selector", "button")).click()</code><br />
(Simple code is better than complex code.)</p>
<p>💡 SeleniumBase gives you clean error output when a test fails. With raw Selenium, error messages can get very messy.</p>
<p>💡 SeleniumBase gives you the option to generate a dashboard and reports for tests. It also saves screenshots from failing tests to the <code translate="no">./latest_logs/</code> folder. Raw <a href="https://www.selenium.dev/documentation/webdriver/" translate="no" target="_blank">Selenium</a> does not have these options out-of-the-box.</p>
<p>💡 SeleniumBase includes desktop GUI apps for running tests, such as <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/commander.md" translate="no">SeleniumBase Commander</a> for <code translate="no">pytest</code> and <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/behave_bdd/ReadMe.md" translate="no">SeleniumBase Behave GUI</a> for <code translate="no">behave</code>.</p>
<p>💡 SeleniumBase has its own <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/recorder_mode.md">Recorder / Test Generator</a> for creating tests from manual browser actions.</p>
<p>💡 SeleniumBase comes with <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/case_plans.md">test case management software, ("CasePlans")</a>, for organizing tests and step descriptions.</p>
<p>💡 SeleniumBase includes tools for <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/chart_maker/ReadMe.md">building data apps, ("ChartMaker")</a>, which can generate JavaScript from Python.</p>
</div>
</details>
--------
<p>📚 <b>Learn about different ways of writing tests:</b></p>
<p align="left">📗📝 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_simple_login.py">test_simple_login.py</a>, which uses <code translate="no"><a href="https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/fixtures/base_case.py">BaseCase</a></code> class inheritance, and runs with <a href="https://docs.pytest.org/en/latest/how-to/usage.html">pytest</a> or <a href="https://github.com/mdmintz/pynose">pynose</a>. (Use <code translate="no">self.driver</code> to access Selenium's raw <code translate="no">driver</code>.)</p>
```python
from seleniumbase import BaseCase
BaseCase.main(__name__, __file__)
class TestSimpleLogin(BaseCase):
def test_simple_login(self):
self.open("seleniumbase.io/simple/login")
self.type("#username", "demo_user")
self.type("#password", "secret_pass")
self.click('a:contains("Sign in")')
self.assert_exact_text("Welcome!", "h1")
self.assert_element("img#image1")
self.highlight("#image1")
self.click_link("Sign out")
self.assert_text("signed out", "#top_message")
```
<p align="left">📘📝 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_login_sb.py">raw_login_sb.py</a>, which uses the <b><code translate="no">SB</code></b> Context Manager. Runs with pure <code translate="no">python</code>. (Use <code translate="no">sb.driver</code> to access Selenium's raw <code translate="no">driver</code>.)</p>
```python
from seleniumbase import SB
with SB() as sb:
sb.open("seleniumbase.io/simple/login")
sb.type("#username", "demo_user")
sb.type("#password", "secret_pass")
sb.click('a:contains("Sign in")')
sb.assert_exact_text("Welcome!", "h1")
sb.assert_element("img#image1")
sb.highlight("#image1")
sb.click_link("Sign out")
sb.assert_text("signed out", "#top_message")
```
<p align="left">📙📝 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_login_driver.py">raw_login_driver.py</a>, which uses the <b><code translate="no">Driver</code></b> Manager. Runs with pure <code translate="no">python</code>. (The <code>driver</code> is an improved version of Selenium's raw <code translate="no">driver</code>, with more methods.)</p>
```python
from seleniumbase import Driver
driver = Driver()
try:
driver.open("seleniumbase.io/simple/login")
driver.type("#username", "demo_user")
driver.type("#password", "secret_pass")
driver.click('a:contains("Sign in")')
driver.assert_exact_text("Welcome!", "h1")
driver.assert_element("img#image1")
driver.highlight("#image1")
driver.click_link("Sign out")
driver.assert_text("signed out", "#top_message")
finally:
driver.quit()
```
--------
<a id="python_installation"></a>
<h2><img src="https://seleniumbase.github.io/cdn/img/python_logo.png" title="SeleniumBase" width="42" /> Set up Python & Git:</h2>
<a href="https://www.python.org/downloads/"><img src="https://img.shields.io/pypi/pyversions/seleniumbase.svg?color=FACE42" title="Supported Python Versions" /></a>
🔵 Add <b><a href="https://www.python.org/downloads/">Python</a></b> and <b><a href="https://git-scm.com/">Git</a></b> to your System PATH.
🔵 Using a <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/virtualenv_instructions.md">Python virtual env</a> is recommended.
<a id="install_seleniumbase"></a>
<h2><img src="https://seleniumbase.github.io/img/logo7.png" title="SeleniumBase" width="32" /> Install SeleniumBase:</h2>
**You can install ``seleniumbase`` from [PyPI](https://pypi.org/project/seleniumbase/) or [GitHub](https://github.com/seleniumbase/SeleniumBase):**
🔵 **How to install ``seleniumbase`` from PyPI:**
```bash
pip install seleniumbase
```
* (Add ``--upgrade`` OR ``-U`` to upgrade SeleniumBase.)
* (Add ``--force-reinstall`` to upgrade indirect packages.)
* (Use ``pip3`` if multiple versions of Python are present.)
🔵 **How to install ``seleniumbase`` from a GitHub clone:**
```bash
git clone https://github.com/seleniumbase/SeleniumBase.git
cd SeleniumBase/
pip install -e .
```
🔵 **How to upgrade an existing install from a GitHub clone:**
```bash
git pull
pip install -e .
```
🔵 **Type ``seleniumbase`` or ``sbase`` to verify that SeleniumBase was installed successfully:**
```bash
___ _ _ ___
/ __| ___| |___ _ _ (_)_ _ _ __ | _ ) __ _ ______
\__ \/ -_) / -_) ' \| | \| | ' \ | _ \/ _` (_-< -_)
|___/\___|_\___|_||_|_|\_,_|_|_|_\|___/\__,_/__|___|
----------------------------------------------------
╭──────────────────────────────────────────────────╮
│ * USAGE: "seleniumbase [COMMAND] [PARAMETERS]" │
│ * OR: "sbase [COMMAND] [PARAMETERS]" │
│ │
│ COMMANDS: PARAMETERS / DESCRIPTIONS: │
│ get / install [DRIVER_NAME] [OPTIONS] │
│ methods (List common Python methods) │
│ options (List common pytest options) │
│ behave-options (List common behave options) │
│ gui / commander [OPTIONAL PATH or TEST FILE] │
│ behave-gui (SBase Commander for Behave) │
│ caseplans [OPTIONAL PATH or TEST FILE] │
│ mkdir [DIRECTORY] [OPTIONS] │
│ mkfile [FILE.py] [OPTIONS] │
│ mkrec / codegen [FILE.py] [OPTIONS] │
│ recorder (Open Recorder Desktop App.) │
│ record (If args: mkrec. Else: App.) │
│ mkpres [FILE.py] [LANG] │
│ mkchart [FILE.py] [LANG] │
│ print [FILE] [OPTIONS] │
│ translate [SB_FILE.py] [LANG] [ACTION] │
│ convert [WEBDRIVER_UNITTEST_FILE.py] │
│ extract-objects [SB_FILE.py] │
│ inject-objects [SB_FILE.py] [OPTIONS] │
│ objectify [SB_FILE.py] [OPTIONS] │
│ revert-objects [SB_FILE.py] [OPTIONS] │
│ encrypt / obfuscate │
│ decrypt / unobfuscate │
│ proxy (Start a basic proxy server) │
│ download server (Get Selenium Grid JAR file) │
│ grid-hub [start|stop] [OPTIONS] │
│ grid-node [start|stop] --hub=[HOST/IP] │
│ │
│ * EXAMPLE => "sbase get chromedriver stable" │
│ * For command info => "sbase help [COMMAND]" │
│ * For info on all commands => "sbase --help" │
╰──────────────────────────────────────────────────╯
```
<h3>🔵 Downloading webdrivers:</h3>
✅ SeleniumBase automatically downloads webdrivers as needed, such as ``chromedriver``.
<div></div>
<details>
<summary> ▶️ Here's sample output from a chromedriver download. (<b>click to expand</b>)</summary>
```bash
*** chromedriver to download = 131.0.6778.108 (Latest Stable)
Downloading chromedriver-mac-arm64.zip from:
https://storage.googleapis.com/chrome-for-testing-public/131.0.6778.108/mac-arm64/chromedriver-mac-arm64.zip ...
Download Complete!
Extracting ['chromedriver'] from chromedriver-mac-arm64.zip ...
Unzip Complete!
The file [chromedriver] was saved to:
~/github/SeleniumBase/seleniumbase/drivers/
chromedriver
Making [chromedriver 131.0.6778.108] executable ...
[chromedriver 131.0.6778.108] is now ready for use!
```
</details>
<a id="basic_example_and_usage"></a>
<h2><img src="https://seleniumbase.github.io/img/logo7.png" title="SeleniumBase" width="32" /> Basic Example / Usage:</h2>
🔵 If you've cloned SeleniumBase, you can run tests from the [examples/](https://github.com/seleniumbase/SeleniumBase/tree/master/examples) folder.
<p align="left">Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py">my_first_test.py</a>:</p>
```bash
cd examples/
pytest my_first_test.py
```
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py"><img src="https://seleniumbase.github.io/cdn/gif/fast_swag_2.gif" alt="SeleniumBase Test" title="SeleniumBase Test" width="480" /></a>
<p align="left"><b>Here's the full code for <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py">my_first_test.py</a>:</b></p>
```python
from seleniumbase import BaseCase
BaseCase.main(__name__, __file__)
class MyTestClass(BaseCase):
def test_swag_labs(self):
self.open("https://www.saucedemo.com")
self.type("#user-name", "standard_user")
self.type("#password", "secret_sauce\n")
self.assert_element("div.inventory_list")
self.assert_exact_text("Products", "span.title")
self.click('button[name*="backpack"]')
self.click("#shopping_cart_container a")
self.assert_exact_text("Your Cart", "span.title")
self.assert_text("Backpack", "div.cart_item")
self.click("button#checkout")
self.type("#first-name", "SeleniumBase")
self.type("#last-name", "Automation")
self.type("#postal-code", "77123")
self.click("input#continue")
self.assert_text("Checkout: Overview")
self.assert_text("Backpack", "div.cart_item")
self.assert_text("29.99", "div.inventory_item_price")
self.click("button#finish")
self.assert_exact_text("Thank you for your order!", "h2")
self.assert_element('img[alt="Pony Express"]')
self.js_click("a#logout_sidebar_link")
self.assert_element("div#login_button_container")
```
* By default, **[CSS Selectors](https://www.w3schools.com/cssref/css_selectors.asp)** are used for finding page elements.
* If you're new to CSS Selectors, games like [CSS Diner](http://flukeout.github.io/) can help you learn.
* For more reading, [here's an advanced guide on CSS attribute selectors](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors).
<a id="common_methods"></a>
<h3><img src="https://seleniumbase.github.io/img/logo7.png" title="SeleniumBase" width="32" /> Here are some common SeleniumBase methods:</h3>
```python
self.open(url) # Navigate the browser window to the URL.
self.type(selector, text) # Update the field with the text.
self.click(selector) # Click the element with the selector.
self.click_link(link_text) # Click the link containing text.
self.go_back() # Navigate back to the previous URL.
self.select_option_by_text(dropdown_selector, option)
self.hover_and_click(hover_selector, click_selector)
self.drag_and_drop(drag_selector, drop_selector)
self.get_text(selector) # Get the text from the element.
self.get_current_url() # Get the URL of the current page.
self.get_page_source() # Get the HTML of the current page.
self.get_attribute(selector, attribute) # Get element attribute.
self.get_title() # Get the title of the current page.
self.switch_to_frame(frame) # Switch into the iframe container.
self.switch_to_default_content() # Leave the iframe container.
self.open_new_window() # Open a new window in the same browser.
self.switch_to_window(window) # Switch to the browser window.
self.switch_to_default_window() # Switch to the original window.
self.get_new_driver(OPTIONS) # Open a new driver with OPTIONS.
self.switch_to_driver(driver) # Switch to the browser driver.
self.switch_to_default_driver() # Switch to the original driver.
self.wait_for_element(selector) # Wait until element is visible.
self.is_element_visible(selector) # Return element visibility.
self.is_text_visible(text, selector) # Return text visibility.
self.sleep(seconds) # Do nothing for the given amount of time.
self.save_screenshot(name) # Save a screenshot in .png format.
self.assert_element(selector) # Verify the element is visible.
self.assert_text(text, selector) # Verify text in the element.
self.assert_exact_text(text, selector) # Verify text is exact.
self.assert_title(title) # Verify the title of the web page.
self.assert_downloaded_file(file) # Verify file was downloaded.
self.assert_no_404_errors() # Verify there are no broken links.
self.assert_no_js_errors() # Verify there are no JS errors.
```
🔵 For the complete list of SeleniumBase methods, see: <b><a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/method_summary.md">Method Summary</a></b>
<a id="fun_facts"></a>
<h2><img src="https://seleniumbase.github.io/img/logo7.png" title="SeleniumBase" width="32" /> Fun Facts / Learn More:</h2>
<p>✅ SeleniumBase automatically handles common <a href="https://www.selenium.dev/documentation/webdriver/" target="_blank">WebDriver</a> actions such as launching web browsers before tests, saving screenshots during failures, and closing web browsers after tests.</p>
<p>✅ SeleniumBase lets you customize tests via <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/customizing_test_runs.md">command-line options</a>.</p>
<p>✅ SeleniumBase uses simple syntax for commands. Example:</p>
```python
self.type("input", "dogs\n") # (The "\n" presses ENTER)
```
Most SeleniumBase scripts can be run with <code translate="no">pytest</code>, <code translate="no">pynose</code>, or pure <code translate="no">python</code>. Not all test runners can run all test formats. For example, tests that use the ``sb`` pytest fixture can only be run with ``pytest``. (See <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md">Syntax Formats</a>) There's also a <a href="https://behave.readthedocs.io/en/stable/gherkin.html#features" target="_blank">Gherkin</a> test format that runs with <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/behave_bdd/ReadMe.md">behave</a>.
```bash
pytest coffee_cart_tests.py --rs
pytest test_sb_fixture.py --demo
pytest test_suite.py --rs --html=report.html --dashboard
pynose basic_test.py --mobile
pynose test_suite.py --headless --report --show-report
python raw_sb.py
python raw_test_scripts.py
behave realworld.feature
behave calculator.feature -D rs -D dashboard
```
<p>✅ <code translate="no">pytest</code> includes automatic test discovery. If you don't specify a specific file or folder to run, <code translate="no">pytest</code> will automatically search through all subdirectories for tests to run based on the following criteria:</p>
* Python files that start with ``test_`` or end with ``_test.py``.
* Python methods that start with ``test_``.
With a SeleniumBase [pytest.ini](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/pytest.ini) file present, you can modify default discovery settings. The Python class name can be anything because ``seleniumbase.BaseCase`` inherits ``unittest.TestCase`` to trigger autodiscovery.
<p>✅ You can do a pre-flight check to see which tests would get discovered by <code translate="no">pytest</code> before the actual run:</p>
```bash
pytest --co -q
```
<p>✅ You can be more specific when calling <code translate="no">pytest</code> or <code translate="no">pynose</code> on a file:</p>
```bash
pytest [FILE_NAME.py]::[CLASS_NAME]::[METHOD_NAME]
pynose [FILE_NAME.py]:[CLASS_NAME].[METHOD_NAME]
```
<p>✅ No More Flaky Tests! SeleniumBase methods automatically wait for page elements to finish loading before interacting with them (<i>up to a timeout limit</i>). This means <b>you no longer need random <span><code translate="no">time.sleep()</code></span> statements</b> in your scripts.</p>
<img src="https://img.shields.io/badge/Flaky%20Tests%3F-%20NO%21-11BBDD.svg" alt="NO MORE FLAKY TESTS!" />
✅ SeleniumBase supports all major browsers and operating systems:
<p><b>Browsers:</b> Chrome, Edge, Firefox, and Safari.</p>
<p><b>Systems:</b> Linux/Ubuntu, macOS, and Windows.</p>
✅ SeleniumBase works on all popular CI/CD platforms:
<p><a href="https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/github/workflows/ReadMe.md"><img alt="GitHub Actions integration" src="https://img.shields.io/badge/GitHub_Actions-12B2C2.svg?logo=GitHubActions&logoColor=CFFFC2" /></a> <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/azure/jenkins/ReadMe.md"><img alt="Jenkins integration" src="https://img.shields.io/badge/Jenkins-32B242.svg?logo=jenkins&logoColor=white" /></a> <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/azure/azure_pipelines/ReadMe.md"><img alt="Azure integration" src="https://img.shields.io/badge/Azure-2288EE.svg?logo=AzurePipelines&logoColor=white" /></a> <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/google_cloud/ReadMe.md"><img alt="Google Cloud integration" src="https://img.shields.io/badge/Google_Cloud-11CAE8.svg?logo=GoogleCloud&logoColor=EE0066" /></a> <a href="#utilizing_advanced_features"><img alt="AWS integration" src="https://img.shields.io/badge/AWS-4488DD.svg?logo=AmazonAWS&logoColor=FFFF44" /></a> <a href="https://en.wikipedia.org/wiki/Personal_computer" target="_blank"><img alt="Your Computer" src="https://img.shields.io/badge/💻_Your_Computer-44E6E6.svg" /></a></p>
<p>✅ SeleniumBase includes an automated/manual hybrid solution called <b><a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/master_qa/ReadMe.md">MasterQA</a></b> to speed up manual testing with automation while manual testers handle validation.</p>
<p>✅ SeleniumBase supports <a href="https://github.com/seleniumbase/SeleniumBase/tree/master/examples/offline_examples">running tests while offline</a> (<i>assuming webdrivers have previously been downloaded when online</i>).</p>
<p>✅ For a full list of SeleniumBase features, <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/features_list.md">Click Here</a>.</p>
<a id="demo_mode_and_debugging"></a>
<h2><img src="https://seleniumbase.github.io/img/logo7.png" title="SeleniumBase" width="32" /> Demo Mode / Debugging:</h2>
🔵 <b>Demo Mode</b> helps you see what a test is doing. If a test is moving too fast for your eyes, run it in <b>Demo Mode</b> to pause the browser briefly between actions, highlight page elements being acted on, and display assertions:
```bash
pytest my_first_test.py --demo
```
🔵 ``time.sleep(seconds)`` can be used to make a test wait at a specific spot:
```python
import time; time.sleep(3) # Do nothing for 3 seconds.
```
🔵 **Debug Mode** with Python's built-in **[pdb](https://docs.python.org/3/library/pdb.html)** library helps you debug tests:
```python
import pdb; pdb.set_trace()
import pytest; pytest.set_trace()
breakpoint() # Shortcut for "import pdb; pdb.set_trace()"
```
> (**``pdb``** commands: ``n``, ``c``, ``s``, ``u``, ``d`` => ``next``, ``continue``, ``step``, ``up``, ``down``)
🔵 To pause an active test that throws an exception or error, (*and keep the browser window open while **Debug Mode** begins in the console*), add **``--pdb``** as a ``pytest`` option:
```bash
pytest test_fail.py --pdb
```
🔵 To start tests in Debug Mode, add **``--trace``** as a ``pytest`` option:
```bash
pytest test_coffee_cart.py --trace
```
<a href="https://github.com/mdmintz/pdbp"><img src="https://seleniumbase.github.io/cdn/gif/coffee_pdbp.gif" alt="SeleniumBase test with the pdbp (Pdb+) debugger" title="SeleniumBase test with the pdbp (Pdb+) debugger" /></a>
<a id="command_line_options"></a>
<h2>🔵 Command-line Options:</h2>
<a id="pytest_options"></a>
✅ Here are some useful command-line options that come with <code translate="no">pytest</code>:
```bash
-v # Verbose mode. Prints the full name of each test and shows more details.
-q # Quiet mode. Print fewer details in the console output when running tests.
-x # Stop running the tests after the first failure is reached.
--html=report.html # Creates a detailed pytest-html report after tests finish.
--co | --collect-only # Show what tests would get run. (Without running them)
--co -q # (Both options together!) - Do a dry run with full test names shown.
-n=NUM # Multithread the tests using that many threads. (Speed up test runs!)
-s # See print statements. (Should be on by default with pytest.ini present.)
--junit-xml=report.xml # Creates a junit-xml report after tests finish.
--pdb # If a test fails, enter Post Mortem Debug Mode. (Don't use with CI!)
--trace # Enter Debug Mode at the beginning of each test. (Don't use with CI!)
-m=MARKER # Run tests with the specified pytest marker.
```
<a id="new_pytest_options"></a>
✅ SeleniumBase provides additional <code translate="no">pytest</code> command-line options for tests:
```bash
--browser=BROWSER # (The web browser to use. Default: "chrome".)
--chrome # (Shortcut for "--browser=chrome". On by default.)
--edge # (Shortcut for "--browser=edge".)
--firefox # (Shortcut for "--browser=firefox".)
--safari # (Shortcut for "--browser=safari".)
--settings-file=FILE # (Override default SeleniumBase settings.)
--env=ENV # (Set the test env. Access with "self.env" in tests.)
--account=STR # (Set account. Access with "self.account" in tests.)
--data=STRING # (Extra test data. Access with "self.data" in tests.)
--var1=STRING # (Extra test data. Access with "self.var1" in tests.)
--var2=STRING # (Extra test data. Access with "self.var2" in tests.)
--var3=STRING # (Extra test data. Access with "self.var3" in tests.)
--variables=DICT # (Extra test data. Access with "self.variables".)
--user-data-dir=DIR # (Set the Chrome user data directory to use.)
--protocol=PROTOCOL # (The Selenium Grid protocol: http|https.)
--server=SERVER # (The Selenium Grid server/IP used for tests.)
--port=PORT # (The Selenium Grid port used by the test server.)
--cap-file=FILE # (The web browser's desired capabilities to use.)
--cap-string=STRING # (The web browser's desired capabilities to use.)
--proxy=SERVER:PORT # (Connect to a proxy server:port as tests are running)
--proxy=USERNAME:PASSWORD@SERVER:PORT # (Use an authenticated proxy server)
--proxy-bypass-list=STRING # (";"-separated hosts to bypass, Eg "*.foo.com")
--proxy-pac-url=URL # (Connect to a proxy server using a PAC_URL.pac file.)
--proxy-pac-url=USERNAME:PASSWORD@URL # (Authenticated proxy with PAC URL.)
--proxy-driver # (If a driver download is needed, will use: --proxy=PROXY.)
--multi-proxy # (Allow multiple authenticated proxies when multi-threaded.)
--agent=STRING # (Modify the web browser's User-Agent string.)
--mobile # (Use the mobile device emulator while running tests.)
--metrics=STRING # (Set mobile metrics: "CSSWidth,CSSHeight,PixelRatio".)
--chromium-arg="ARG=N,ARG2" # (Set Chromium args, ","-separated, no spaces.)
--firefox-arg="ARG=N,ARG2" # (Set Firefox args, comma-separated, no spaces.)
--firefox-pref=SET # (Set a Firefox preference:value set, comma-separated.)
--extension-zip=ZIP # (Load a Chrome Extension .zip|.crx, comma-separated.)
--extension-dir=DIR # (Load a Chrome Extension directory, comma-separated.)
--disable-features="F1,F2" # (Disable features, comma-separated, no spaces.)
--binary-location=PATH # (Set path of the Chromium browser binary to use.)
--driver-version=VER # (Set the chromedriver or uc_driver version to use.)
--sjw # (Skip JS Waits for readyState to be "complete" or Angular to load.)
--wfa # (Wait for AngularJS to be done loading after specific web actions.)
--pls=PLS # (Set pageLoadStrategy on Chrome: "normal", "eager", or "none".)
--headless # (The default headless mode. Linux uses this mode by default.)
--headless1 # (Use Chrome's old headless mode. Fast, but has limitations.)
--headless2 # | text/markdown | Michael Mintz | mdmintz@gmail.com | Michael Mintz | null | MIT | null | [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Environment :: MacOS X",
"Environment :: Win32 (MS Windows)",
"Environment :: Web Environment",
"Framework :: Pytest",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Internet",
"Topic :: Scientific/Engineering",
"Topic :: Software Development",
"Topic :: Software Development :: Quality Assurance",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Testing",
"Topic :: Software Development :: Testing :: Acceptance",
"Topic :: Software Development :: Testing :: Traffic Generation",
"Topic :: Utilities"
] | [
"Windows"
] | https://github.com/seleniumbase/SeleniumBase | null | >=3.9 | [] | [] | [] | [
"seleniumbase>=4.47.0"
] | [] | [] | [] | [
"Homepage, https://github.com/seleniumbase/SeleniumBase",
"Changelog, https://github.com/seleniumbase/SeleniumBase/releases",
"Download, https://pypi.org/project/seleniumbase/#files",
"Blog, https://seleniumbase.com/",
"Discord, https://discord.gg/EdhQTn3EyE",
"PyPI, https://pypi.org/project/seleniumbase/",
"Source, https://github.com/seleniumbase/SeleniumBase",
"Repository, https://github.com/seleniumbase/SeleniumBase",
"Documentation, https://seleniumbase.io/"
] | twine/6.2.0 CPython/3.11.9 | 2026-02-20T18:58:34.154629 | pytest_seleniumbase-4.47.0.tar.gz | 68,012 | e9/02/c7b837b62dc73ac4946b74e2e99eee084dd73dbdc61ad8ce3673d97277f5/pytest_seleniumbase-4.47.0.tar.gz | source | sdist | null | false | 99aa0a8451aba11f13f89e64cce2be60 | f40d1a724eabbabd1f71f6fb13434c004726079766f9f399d3c44c3d186c9911 | e902c7b837b62dc73ac4946b74e2e99eee084dd73dbdc61ad8ce3673d97277f5 | null | [] | 197 |
2.4 | autotimm | 0.7.11 | Automatic Pytorch Image Models | <p align="center">
<img src="https://drive.google.com/uc?export=view&id=1IO383lY97phOg9qDVARnG9HQ2McOF7Zj" alt="AutoTimm" width="400">
</p>
<p align="center">
<strong>Train state-of-the-art vision models with minimal code</strong><br>
From prototype to production in minutes, not hours
</p>
<p align="center">
<a href="https://pypi.org/project/autotimm/"><img src="https://img.shields.io/pypi/v/autotimm?color=blue&logo=pypi&logoColor=white" alt="PyPI"></a>
<a href="https://pypi.org/project/autotimm/"><img src="https://img.shields.io/pypi/pyversions/autotimm?logo=python&logoColor=white" alt="Python"></a>
<a href="https://github.com/theja-vanka/AutoTimm/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Apache%202.0-green" alt="License"></a>
<a href="https://github.com/theja-vanka/AutoTimm/stargazers"><img src="https://img.shields.io/github/stars/theja-vanka/AutoTimm?style=social" alt="Stars"></a>
</p>
<p align="center">
<a href="https://theja-vanka.github.io/AutoTimm/">Documentation</a> •
<a href="https://theja-vanka.github.io/AutoTimm/getting-started/quickstart/">Quick Start</a> •
<a href="https://theja-vanka.github.io/AutoTimm/examples/">Examples</a> •
<a href="https://theja-vanka.github.io/AutoTimm/api/">API Reference</a>
</p>
---
<details>
<summary><strong>v0.7 Changelog</strong></summary>
### v0.7.10 — Loguru Logging & Dependency Cleanup
**Logging Migration: `rich` → `loguru`**
- New `autotimm.logging` module with a centralized loguru-based `logger` and `log_table()` helper
- `logger` exported at the top level: `from autotimm import logger`
- All internal `print()` and `rich` console output replaced with structured loguru calls (`logger.info`, `logger.warning`, `logger.success`, `logger.error`) across trainer, export, data modules, interpretation, and YOLOX utilities
- Colored, timestamped log format: `HH:mm:ss | LEVEL | module:function - message`
**Dependency Changes**
- `loguru>=0.7` added as a core dependency
- `plotly>=5.0` promoted from optional `[interactive]` extra to core dependency
- `rich>=13.0` removed as a dependency
- `[interactive]` install extra removed (plotly is now always available)
**Removed**
- `summary()` and `_print_summary()` methods removed from all DataModules (`ImageDataModule`, `DetectionDataModule`, `SegmentationDataModule`, `InstanceSegmentationDataModule`, `MultiLabelImageDataModule`)
- `AutoTrainer._print_summaries()` removed — pre-training model/data summary printing is no longer automatic
### v0.7.9 — Reproducibility by Default
- Default random seeding (`seed=42`, `deterministic=True`) for all task classes and `AutoTrainer`
- New `seed_everything()` utility function
- Trainer supports `use_autotimm_seeding` flag to choose between Lightning's seeding and AutoTimm's custom seeding
### v0.7.8 — torch.compile Integration
- `torch.compile()` enabled by default for all task types (`compile_model=True`)
- Compiles backbone, heads, FPN, neck across all architectures
- Graceful fallback on PyTorch < 2.0
### v0.7.5 — ONNX Export
- ONNX export via `export_to_onnx()`, `load_onnx()`, `validate_onnx_export()`, `export_checkpoint_to_onnx()`
- `model.to_onnx()` convenience method on all task models
- Dynamic batch dimension by default
### v0.7.2 — TorchScript Export & Model Interpretation
- TorchScript export with `export_to_torchscript()` and `model.to_torchscript()`
- 6 interpretation methods (GradCAM, GradCAM++, Integrated Gradients, SmoothGrad, AttentionRollout, AttentionFlow)
- 6 explanation quality metrics
- Interactive Plotly visualizations
- YOLOX official model support
- Smart backend selection and TransformConfig
- CLI support (`autotimm fit --config config.yaml`)
</details>
---
## What is AutoTimm?
AutoTimm is a **production-ready** computer vision framework that combines [timm](https://github.com/huggingface/pytorch-image-models) (1000+ pretrained models) with [PyTorch Lightning](https://github.com/Lightning-AI/pytorch-lightning). Train image classifiers, object detectors, and segmentation models with any timm backbone using a simple, intuitive API.
**Perfect for:**
- **Researchers** needing reproducible experiments and quick iterations
- **Engineers** building production ML systems with minimal boilerplate
- **Students** learning computer vision with modern best practices
- **Startups** rapidly prototyping vision applications
## Why AutoTimm?
<table>
<tr>
<td width="33%">
<h3 align="center">Fast</h3>
<p align="center">
From idea to trained model in minutes. Auto-tuning, mixed precision, and multi-GPU out of the box.
</p>
</td>
<td width="33%">
<h3 align="center">Flexible</h3>
<p align="center">
1000+ backbones, 4 vision tasks, multiple transform backends. Use what works best.
</p>
</td>
<td width="33%">
<h3 align="center">Production Ready</h3>
<p align="center">
487 tests, comprehensive logging, checkpoint management. Deploy with confidence.
</p>
</td>
</tr>
</table>
<p align="center">
<a href="https://www.buymeacoffee.com/theja.vanka" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-blue.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>
</p>
## Quick Start
### Installation
```bash
pip install autotimm
```
**Everything included:** PyTorch, timm, PyTorch Lightning, torchmetrics, albumentations, pycocotools, and more.
<details>
<summary><strong>Optional extras</strong></summary>
```bash
# Logging backends
pip install autotimm[tensorboard] # TensorBoard
pip install autotimm[wandb] # Weights & Biases
pip install autotimm[mlflow] # MLflow
# All extras
pip install autotimm[all] # Everything
```
</details>
### Your First Model in 30 Seconds
```python
from autotimm import AutoTrainer, ImageClassifier, ImageDataModule, MetricConfig
# Data
data = ImageDataModule(
data_dir="./data",
dataset_name="CIFAR10",
image_size=224,
batch_size=64,
)
# Metrics
metrics = [
MetricConfig(
name="accuracy",
backend="torchmetrics",
metric_class="Accuracy",
params={"task": "multiclass"},
stages=["train", "val", "test"],
prog_bar=True,
)
]
# Model
model = ImageClassifier(
backbone="resnet18", # Try efficientnet_b0, vit_base_patch16_224, etc.
num_classes=10,
metrics=metrics,
lr=1e-3,
)
# Train with auto-tuning (finds optimal LR and batch size automatically!)
trainer = AutoTrainer(max_epochs=10)
trainer.fit(model, datamodule=data)
```
> **Auto-tuning is enabled by default.** Disable with `tuner_config=False` for manual control.
## Key Features
<table>
<tr>
<td><strong>4 Vision Tasks</strong></td>
<td>Classification (single & multi-label) • Object Detection • Semantic Segmentation • Instance Segmentation</td>
</tr>
<tr>
<td><strong>1000+ Backbones</strong></td>
<td>ResNet • EfficientNet • ViT • ConvNeXt • Swin • DeiT • BEiT • and more from timm</td>
</tr>
<tr>
<td><strong>Model Interpretation</strong></td>
<td>6 explanation methods • 6 quality metrics • Interactive visualizations • Up to 100x speedup</td>
</tr>
<tr>
<td><strong>HuggingFace Integration</strong></td>
<td>Load models from HF Hub with <code>hf-hub:</code> prefix + Direct Transformers support</td>
</tr>
<tr>
<td><strong>YOLOX Support</strong></td>
<td>Official YOLOX models (nano → X) + YOLOX-style heads with any timm backbone</td>
</tr>
<tr>
<td><strong>Advanced Architectures</strong></td>
<td>DeepLabV3+ • FCOS • YOLOX • Mask R-CNN • Feature Pyramids</td>
</tr>
<tr>
<td><strong>Auto-Tuning</strong></td>
<td>Automatic LR and batch size finding—enabled by default</td>
</tr>
<tr>
<td><strong>Smart Transforms</strong></td>
<td>AI-powered backend recommendations + unified TransformConfig with presets</td>
</tr>
<tr>
<td><strong>Multi-Logger Support</strong></td>
<td>TensorBoard • MLflow • Weights & Biases • CSV—use simultaneously</td>
</tr>
<tr>
<td><strong>torch.compile Support</strong></td>
<td>Automatic PyTorch 2.0+ optimization • Enabled by default • Configurable modes</td>
</tr>
<tr>
<td><strong>CLI Support</strong></td>
<td>YAML-config-driven training from the command line — <code>autotimm fit --config config.yaml</code></td>
</tr>
<tr>
<td><strong>CSV Data Loading</strong></td>
<td>Load any task from CSV files — classification, detection, segmentation, instance segmentation</td>
</tr>
<tr>
<td><strong>Model Export</strong></td>
<td>TorchScript (.pt) and ONNX (.onnx) export • ONNX Runtime, TensorRT, OpenVINO, CoreML</td>
</tr>
<tr>
<td><strong>Production Ready</strong></td>
<td>Mixed precision • Multi-GPU • Gradient accumulation • 487 tests</td>
</tr>
</table>
## Task Examples
### Image Classification
```python
from autotimm import ImageClassifier
# Use any timm backbone or HuggingFace model
model = ImageClassifier(
backbone="efficientnet_b0", # or "hf-hub:timm/resnet50.a1_in1k"
num_classes=10,
metrics=metrics, # Optional for inference!
)
trainer = AutoTrainer(max_epochs=10)
trainer.fit(model, datamodule=data)
```
### Multi-Label Classification
```python
from autotimm import ImageClassifier, MultiLabelImageDataModule, MetricConfig
# CSV data with columns: image_path, cat, dog, outdoor, indoor
data = MultiLabelImageDataModule(
train_csv="train.csv",
image_dir="./images",
val_csv="val.csv",
image_size=224,
batch_size=32,
)
data.setup("fit")
model = ImageClassifier(
backbone="resnet50",
num_classes=data.num_labels,
multi_label=True, # BCEWithLogitsLoss + sigmoid
threshold=0.5,
metrics=[
MetricConfig(
name="accuracy",
backend="torchmetrics",
metric_class="MultilabelAccuracy",
params={"num_labels": data.num_labels},
stages=["train", "val"],
prog_bar=True,
),
],
)
trainer = AutoTrainer(max_epochs=10)
trainer.fit(model, datamodule=data)
```
### Object Detection with YOLOX
**Official YOLOX (matches paper benchmarks):**
```python
from autotimm import YOLOXDetector, DetectionDataModule
model = YOLOXDetector(
model_name="yolox-s", # nano, tiny, s, m, l, x
num_classes=80,
lr=0.01,
optimizer="sgd",
scheduler="yolox",
total_epochs=300,
)
trainer = AutoTrainer(max_epochs=300, precision="16-mixed")
trainer.fit(model, datamodule=DetectionDataModule(data_dir="./coco", image_size=640))
```
**YOLOX-style head with any timm backbone:**
```python
from autotimm import ObjectDetector
model = ObjectDetector(
backbone="resnet50", # Experiment with any backbone!
num_classes=80,
detection_arch="yolox",
fpn_channels=256,
)
```
**[Complete YOLOX Guide](https://theja-vanka.github.io/AutoTimm/user-guide/models/yolox-detector/)** • **[Quick Reference](https://theja-vanka.github.io/AutoTimm/user-guide/guides/yolox-quick-reference/)**
### Semantic Segmentation
```python
from autotimm import SemanticSegmentor, SegmentationDataModule
model = SemanticSegmentor(
backbone="resnet50",
num_classes=19,
head_type="deeplabv3plus",
loss_type="combined", # CE + Dice for better boundaries
)
data = SegmentationDataModule(
data_dir="./cityscapes",
format="cityscapes", # or "coco", "voc", "png"
image_size=512,
)
trainer = AutoTrainer(max_epochs=100)
trainer.fit(model, datamodule=data)
```
### Instance Segmentation
```python
from autotimm import InstanceSegmentor, InstanceSegmentationDataModule
model = InstanceSegmentor(
backbone="resnet50",
num_classes=80,
mask_loss_weight=1.0,
)
trainer = AutoTrainer(max_epochs=100)
trainer.fit(model, datamodule=InstanceSegmentationDataModule(data_dir="./coco"))
```
### CSV Data Loading
Load data from CSV files instead of folder structures or COCO JSON:
```python
from autotimm import ImageClassifier, ImageDataModule, AutoTrainer
# Classification from CSV (columns: image_path, label)
data = ImageDataModule(
train_csv="train.csv",
val_csv="val.csv",
image_dir="./images",
image_size=224,
batch_size=32,
)
model = ImageClassifier(backbone="resnet50", num_classes=10)
trainer = AutoTrainer(max_epochs=10)
trainer.fit(model, datamodule=data)
```
```python
from autotimm import ObjectDetector, DetectionDataModule
# Detection from CSV (columns: image_path, x_min, y_min, x_max, y_max, label)
data = DetectionDataModule(
train_csv="annotations.csv",
image_dir="./images",
image_size=640,
batch_size=8,
)
```
CSV loading is supported for all tasks: classification, object detection, semantic segmentation, and instance segmentation.
**[CSV Data Loading Guide](https://theja-vanka.github.io/AutoTimm/user-guide/data-loading/csv-data/)**
## Model Interpretation & Explainability
Understand what your models learn and how they make decisions with comprehensive interpretation tools.
### Quick Explanation
```python
from autotimm.interpretation import quick_explain
# One-line explanation
result = quick_explain(
model,
image,
method="gradcam",
save_path="explanation.png"
)
```
### 6 Interpretation Methods
```python
from autotimm.interpretation import (
GradCAM, # Fast, class-discriminative (CNNs)
GradCAMPlusPlus, # Better for multiple objects
IntegratedGradients, # Theoretically sound, pixel-level
SmoothGrad, # Noise-reduced gradients
AttentionRollout, # Vision Transformers
AttentionFlow, # Vision Transformers
)
# Use any method
explainer = GradCAM(model)
heatmap = explainer.explain(image, target_class=5)
explainer.visualize(image, heatmap, save_path="gradcam.png")
```
### Quantitative Evaluation
```python
from autotimm.interpretation import ExplanationMetrics
metrics = ExplanationMetrics(model, explainer)
# Faithfulness metrics
deletion = metrics.deletion(image, target_class=5, steps=50)
insertion = metrics.insertion(image, target_class=5, steps=50)
# Stability metric
sensitivity = metrics.sensitivity_n(image, n_samples=50)
# Sanity checks
param_test = metrics.model_parameter_randomization_test(image)
data_test = metrics.data_randomization_test(image)
# Localization metric
pointing = metrics.pointing_game(image, bbox=(50, 50, 150, 150))
print(f"Deletion AUC: {deletion['auc']:.4f}") # Lower = better
print(f"Insertion AUC: {insertion['auc']:.4f}") # Higher = better
print(f"Sensitivity: {sensitivity['sensitivity']:.4f}") # Lower = more stable
```
### Interactive Visualizations
```python
from autotimm.interpretation import InteractiveVisualizer
viz = InteractiveVisualizer(model)
# Create interactive HTML with zoom/pan/hover
fig = viz.visualize_explanation(
image,
explainer,
colorscale="Viridis",
save_path="interactive.html"
)
# Compare methods side-by-side
explainers = {
'GradCAM': GradCAM(model),
'GradCAM++': GradCAMPlusPlus(model),
'Integrated Gradients': IntegratedGradients(model),
}
viz.compare_methods(image, explainers, save_path="comparison.html")
# Generate comprehensive report
viz.create_report(image, explainer, save_path="report.html")
```
### Performance Optimization
```python
from autotimm.interpretation.optimization import (
ExplanationCache, # 10-50x speedup
BatchProcessor, # 2-5x speedup
PerformanceProfiler, # Identify bottlenecks
optimize_for_inference, # 1.5-3x speedup
)
# Enable caching
cache = ExplanationCache(cache_dir="./cache", max_size_mb=5000)
# Optimize model
model = optimize_for_inference(model, use_fp16=True)
# Batch processing
processor = BatchProcessor(model, explainer, batch_size=32)
heatmaps = processor.process_batch(images)
# Profile performance
profiler = PerformanceProfiler(enabled=True)
with profiler.profile("explanation"):
heatmap = explainer.explain(image)
profiler.print_stats()
```
### Training Integration
```python
from autotimm import AutoTrainer
from autotimm.interpretation import InterpretationCallback
# Monitor interpretations during training
callback = InterpretationCallback(
sample_images=val_images,
method="gradcam",
log_every_n_epochs=5,
)
trainer = AutoTrainer(
max_epochs=100,
callbacks=[callback],
logger="tensorboard",
)
trainer.fit(model, datamodule=data)
```
**Features:**
- **6 interpretation methods** for different use cases
- **6 quality metrics** for quantitative evaluation
- **Interactive visualizations** with Plotly (zoom/pan/hover)
- **Up to 100x speedup** with caching and optimization
- **Feature visualization** and receptive field analysis
- **Training callbacks** for automatic monitoring
- **Comprehensive tutorial** notebook included
**[Interpretation Guide](https://theja-vanka.github.io/AutoTimm/user-guide/interpretation/)** • **[Tutorial Notebook](examples/comprehensive_interpretation_tutorial.ipynb)**
## HuggingFace Integration
### Three Approaches
<table>
<thead>
<tr>
<th>Approach</th>
<th>Best For</th>
<th>Example</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>HF Hub timm</strong></td>
<td>CNNs, Production</td>
<td><code>"hf-hub:timm/resnet50.a1_in1k"</code></td>
</tr>
<tr>
<td><strong>HF Transformers Direct</strong></td>
<td>Vision Transformers</td>
<td><code>ViTModel.from_pretrained(...)</code></td>
</tr>
<tr>
<td><strong>HF Transformers Auto</strong></td>
<td>Quick Prototyping</td>
<td><code>AutoModel.from_pretrained(...)</code></td>
</tr>
</tbody>
</table>
**All approaches fully support AutoTrainer** (checkpointing, early stopping, mixed precision, multi-GPU, auto-tuning).
```python
from autotimm import ImageClassifier, list_hf_hub_backbones
# Discover models
models = list_hf_hub_backbones(model_name="resnet", limit=5)
# Use any HF Hub model (just add 'hf-hub:' prefix!)
model = ImageClassifier(
backbone="hf-hub:timm/convnext_base.fb_in22k_ft_in1k",
num_classes=100,
)
```
**[HF Integration Comparison](https://theja-vanka.github.io/AutoTimm/user-guide/integration/huggingface-integration-comparison/)** • **[HF Hub Guide](https://theja-vanka.github.io/AutoTimm/user-guide/integration/huggingface-hub-integration/)** • **[HF Transformers Guide](https://theja-vanka.github.io/AutoTimm/user-guide/integration/huggingface-transformers-integration/)**
## Smart Features
### torch.compile Optimization
**Enabled by default** for all tasks with PyTorch 2.0+:
```python
# Default: torch.compile enabled for faster training/inference
model = ImageClassifier(backbone="resnet50", num_classes=10)
# Disable if needed
model = ImageClassifier(backbone="resnet50", num_classes=10, compile_model=False)
# Custom compile options
model = ImageClassifier(
backbone="resnet50",
num_classes=10,
compile_kwargs={"mode": "reduce-overhead", "fullgraph": True}
)
```
**Compile modes:**
- `"default"` - Balanced performance (default)
- `"reduce-overhead"` - Lower latency, better for smaller batches
- `"max-autotune"` - Maximum optimization, longer compile time
**What gets compiled:**
- Classification: backbone + head
- Detection: backbone + FPN/neck + head
- Segmentation: backbone + segmentation head
- Instance Segmentation: backbone + FPN + detection head + mask head
Gracefully falls back on PyTorch < 2.0 with a warning.
### Reproducibility by Default
**Automatic seeding** for reproducible experiments:
```python
# Default: seed=42, deterministic=True for full reproducibility
model = ImageClassifier(backbone="resnet50", num_classes=10)
trainer = AutoTrainer(max_epochs=10)
# Custom seed
model = ImageClassifier(backbone="resnet50", num_classes=10, seed=123)
trainer = AutoTrainer(max_epochs=10, seed=123)
# Faster training (disable deterministic mode)
model = ImageClassifier(backbone="resnet50", num_classes=10, deterministic=False)
trainer = AutoTrainer(max_epochs=10, deterministic=False)
# Disable seeding (warns if deterministic=True)
model = ImageClassifier(backbone="resnet50", num_classes=10, seed=None, deterministic=False)
# Manual seeding
from autotimm import seed_everything
seed_everything(42, deterministic=True)
```
**What's seeded:**
- Python's `random` module
- NumPy's random number generator
- PyTorch (CPU & CUDA)
- Environment variables for reproducibility
- cuDNN deterministic algorithms (when `deterministic=True`)
**Seeding options:**
- **Model-level:** Seeds when model is created
- **Trainer-level:** Seeds before training starts (uses Lightning's seeding by default)
- **Manual:** Use `seed_everything()` for custom control
Perfect for research papers, debugging, and ensuring consistent results across runs!
### Model Export (TorchScript & ONNX)
Export trained models for production deployment:
```python
from autotimm import ImageClassifier, export_to_torchscript, export_to_onnx
import torch
model = ImageClassifier.load_from_checkpoint("model.ckpt")
example_input = torch.randn(1, 3, 224, 224)
# TorchScript export
export_to_torchscript(model, "model.pt", example_input=example_input)
model.to_torchscript("model.pt") # Convenience method
# ONNX export
export_to_onnx(model, "model.onnx", example_input=example_input)
model.to_onnx("model.onnx") # Convenience method
# Load TorchScript (no AutoTimm needed)
scripted_model = torch.jit.load("model.pt")
output = scripted_model(image)
# Load ONNX (no AutoTimm needed)
import onnxruntime as ort
session = ort.InferenceSession("model.onnx")
outputs = session.run(None, {"input": image.numpy()})
```
| Format | Use Case | Runtimes |
|--------|----------|----------|
| **TorchScript** | PyTorch ecosystem, C++, mobile | LibTorch, PyTorch Mobile |
| **ONNX** | Cross-platform, hardware-optimized | ONNX Runtime, TensorRT, OpenVINO, CoreML |
**Shared benefits:** No Python dependencies, single-file deployment, dynamic batch sizes, all 5 task types supported.
### Smart Backend Selection
```python
from autotimm import recommend_backend, compare_backends
# Get AI-powered recommendation
rec = recommend_backend(task="detection")
config = rec.to_config(image_size=640)
# Compare backends side-by-side
compare_backends()
```
### Unified Transform Configuration
```python
from autotimm import TransformConfig, list_transform_presets
# Discover presets
list_transform_presets() # ['default', 'autoaugment', 'randaugment', ...]
# Configure with model-specific normalization
config = TransformConfig(
preset="randaugment",
image_size=384,
use_timm_config=True, # Auto-detect mean/std from backbone
)
model = ImageClassifier(
backbone="efficientnet_b4",
num_classes=10,
transform_config=config,
)
```
### Custom Auto-Tuning
```python
from autotimm import AutoTrainer, TunerConfig
# Default: Full auto-tuning
trainer = AutoTrainer(max_epochs=10)
# Disable auto-tuning
trainer = AutoTrainer(max_epochs=10, tuner_config=False)
# Custom configuration
trainer = AutoTrainer(
max_epochs=10,
tuner_config=TunerConfig(
auto_lr=True,
auto_batch_size=True,
lr_find_kwargs={"min_lr": 1e-6, "max_lr": 1.0},
),
)
```
### Command-Line Interface (CLI)
Train models from the command line using YAML configs — no Python scripts needed:
```bash
# Train with a config file
autotimm fit --config config.yaml
# Override any parameter
autotimm fit --config config.yaml --model.init_args.lr 0.001 --trainer.max_epochs 20
# Quick smoke test
autotimm fit --config config.yaml --trainer.fast_dev_run true
# Validate or test
autotimm validate --config config.yaml --ckpt_path best.ckpt
autotimm test --config config.yaml --ckpt_path best.ckpt
```
Example `config.yaml`:
```yaml
model:
class_path: autotimm.ImageClassifier
init_args:
backbone: resnet18
num_classes: 10
data:
class_path: autotimm.ImageDataModule
init_args:
dataset_name: CIFAR10
data_dir: ./data
batch_size: 32
image_size: 224
trainer:
max_epochs: 10
accelerator: auto
tuner_config: false
```
Works with all task types: classification, detection, segmentation, and instance segmentation. See [example configs](examples/cli/) for more.
**[CLI Guide](https://theja-vanka.github.io/AutoTimm/user-guide/training/cli/)** | **[CLI API Reference](https://theja-vanka.github.io/AutoTimm/api/cli/)**
### Optional Metrics for Inference
```python
# Training with metrics
model = ImageClassifier(backbone="resnet50", num_classes=10, metrics=metrics)
# Inference without metrics
model = ImageClassifier(backbone="resnet50", num_classes=10)
model = model.load_from_checkpoint("checkpoint.ckpt")
predictions = model(image)
```
## Explore Models
### YOLOX Models
```python
import autotimm
# List all YOLOX variants
autotimm.list_yolox_models() # ['yolox-nano', 'yolox-tiny', 'yolox-s', ...]
# Get detailed specs (params, FLOPs, mAP)
autotimm.list_yolox_models(verbose=True)
# Get model info
info = autotimm.get_yolox_model_info("yolox-s")
print(f"Params: {info['params']}, mAP: {info['mAP']}") # Params: 9.0M, mAP: 40.5
# List components
autotimm.list_yolox_backbones()
autotimm.list_yolox_necks()
autotimm.list_yolox_heads()
```
### timm Backbones
```python
# Search 1000+ timm models
autotimm.list_backbones("*efficientnet*", pretrained_only=True)
autotimm.list_backbones("*vit*")
# Search HuggingFace Hub
autotimm.list_hf_hub_backbones(model_name="resnet", limit=10)
# Inspect a model
backbone = autotimm.create_backbone("convnext_tiny")
print(f"Features: {backbone.num_features}, Params: {autotimm.count_parameters(backbone):,}")
```
## Documentation & Examples
### Documentation
Comprehensive documentation with **interactive diagrams**, search optimization, and fast navigation:
| Section | Description |
|---------|-------------|
| [Quick Start](https://theja-vanka.github.io/AutoTimm/getting-started/quickstart/) | Get up and running in 5 minutes |
| [User Guide](https://theja-vanka.github.io/AutoTimm/user-guide/data-loading/) | In-depth guides for all features |
| [Interpretation Guide](https://theja-vanka.github.io/AutoTimm/user-guide/interpretation/) | Model explainability and visualization |
| [YOLOX Guide](https://theja-vanka.github.io/AutoTimm/user-guide/models/yolox-detector/) | Complete YOLOX implementation guide |
| [CLI Guide](https://theja-vanka.github.io/AutoTimm/user-guide/training/cli/) | Train from YAML configs on the command line |
| [API Reference](https://theja-vanka.github.io/AutoTimm/api/) | Complete API documentation |
| [Examples](https://theja-vanka.github.io/AutoTimm/examples/) | 50+ runnable code examples |
### Ready-to-Run Examples
**🚀 Getting Started**
- [classify_cifar10.py](examples/classify_cifar10.py) - Basic classification with auto-tuning
- [classify_custom_folder.py](examples/classify_custom_folder.py) - Train on custom dataset
- [vit_finetuning.py](examples/vit_finetuning.py) - Two-phase ViT fine-tuning
**🎯 Computer Vision Tasks**
- Object Detection: [yolox_official.py](examples/computer_vision/yolox_official.py), [object_detection_yolox.py](examples/computer_vision/object_detection_yolox.py), [object_detection_coco.py](examples/computer_vision/object_detection_coco.py), [object_detection_rtdetr.py](examples/computer_vision/object_detection_rtdetr.py)
- Segmentation: [semantic_segmentation.py](examples/computer_vision/semantic_segmentation.py), [instance_segmentation.py](examples/computer_vision/instance_segmentation.py)
**🤗 HuggingFace Hub (14 examples)**
- Basic: [huggingface_hub_models.py](examples/huggingface/huggingface_hub_models.py), [hf_hub_*.py](examples/huggingface/) (8 task-specific files)
- Advanced: [hf_interpretation.py](examples/huggingface/hf_interpretation.py), [hf_transfer_learning.py](examples/huggingface/hf_transfer_learning.py), [hf_ensemble.py](examples/huggingface/hf_ensemble.py), [hf_deployment.py](examples/huggingface/hf_deployment.py)
**📊 Data & Training**
- CSV Data: [csv_classification.py](examples/data_training/csv_classification.py), [csv_detection.py](examples/data_training/csv_detection.py), [csv_segmentation.py](examples/data_training/csv_segmentation.py), [csv_instance_segmentation.py](examples/data_training/csv_instance_segmentation.py)
- Data: [multilabel_classification.py](examples/data_training/multilabel_classification.py) - Multi-label from CSV, [hf_custom_data.py](examples/data_training/hf_custom_data.py) - Advanced augmentation
- Training: [multi_gpu_training.py](examples/data_training/multi_gpu_training.py), [hf_hyperparameter_tuning.py](examples/data_training/hf_hyperparameter_tuning.py)
- Optimization: [preset_manager.py](examples/data_training/preset_manager.py), [performance_optimization_demo.py](examples/data_training/performance_optimization_demo.py)
**🔍 Model Understanding**
- Interpretation: [comprehensive_interpretation_tutorial.ipynb](examples/interpretation/comprehensive_interpretation_tutorial.ipynb) (40+ cells), [interpretation_metrics_demo.py](examples/interpretation/interpretation_metrics_demo.py)
- Visualization: [interactive_visualization_demo.py](examples/interpretation/interactive_visualization_demo.py) - Interactive Plotly
- Tracking: [mlflow_tracking.py](examples/logging_inference/mlflow_tracking.py) - MLflow experiment tracking
**:material-console: CLI Configs**
- [classification.yaml](examples/cli/classification.yaml) - Classification with ResNet-18 on CIFAR-10
- [detection.yaml](examples/cli/detection.yaml) - FCOS object detection on COCO
- [segmentation.yaml](examples/cli/segmentation.yaml) - DeepLabV3+ on Cityscapes
**[Browse all examples →](https://theja-vanka.github.io/AutoTimm/examples/)**
## Supported Architectures
**Classification**
- Models: Any timm backbone (1000+)
- Losses: CrossEntropy with label smoothing, Mixup; BCEWithLogitsLoss for multi-label
**Object Detection**
- Architectures: FCOS, YOLOX (official & custom)
- Losses: Focal Loss, GIoU Loss, Centerness Loss
**Semantic Segmentation**
- Architectures: DeepLabV3+, FCN
- Losses: CrossEntropy, Dice, Focal, Combined, Tversky
- Formats: PNG masks, COCO stuff, Cityscapes, Pascal VOC, CSV
**Instance Segmentation**
- Architecture: FCOS + Mask R-CNN style mask head
- Losses: Detection losses + Binary mask loss
- Formats: COCO JSON, CSV with binary mask PNGs
## Testing
Comprehensive test suite with **487 tests**:
```bash
# Run all tests
pytest tests/ -v
# Specific modules
pytest tests/test_classification.py
pytest tests/test_yolox.py
pytest tests/test_interpretation.py
pytest tests/test_csv_datamodules.py
# With coverage
pytest tests/ --cov=autotimm --cov-report=html
```
## Contributing
We welcome contributions!
```bash
git clone https://github.com/theja-vanka/AutoTimm.git
cd AutoTimm
pip install -e ".[dev,all]"
pytest tests/ -v
```
To build the documentation locally:
```bash
./scripts/build_docs.sh
```
For more details, see [scripts/README.md](scripts/README.md).
For major changes, please open an issue first.
## Citation
```bibtex
@software{autotimm,
author = {Krishnatheja Vanka},
title = {AutoTimm: Automatic PyTorch Image Models},
url = {https://github.com/theja-vanka/AutoTimm},
year = {2026},
version = {0.7.10}
}
```
---
<p align="center">
<strong>Built with ❤️ using <a href="https://github.com/huggingface/pytorch-image-models">timm</a> and <a href="https://github.com/Lightning-AI/pytorch-lightning">PyTorch Lightning</a></strong>
</p>
<p align="center">
<a href="https://github.com/theja-vanka/AutoTimm">Star us on GitHub</a> •
<a href="https://github.com/theja-vanka/AutoTimm/issues">Report Issues</a> •
<a href="https://theja-vanka.github.io/AutoTimm/">Read the Docs</a>
</p>
| text/markdown | Krishnatheja Vanka | null | null | null | Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
| deep-learning, computer-vision, pytorch, timm, automation, huggingface_hub, torchvision, torchmetrics | [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Scientific/Engineering :: Artificial Intelligence"
] | [] | null | null | >=3.10 | [] | [] | [] | [
"torch>=2.0",
"torchvision>=0.15",
"timm>=1.0",
"pytorch-lightning>=2.0",
"torchmetrics>=1.0",
"numpy>=1.23",
"opencv-python-headless>=4.8",
"huggingface_hub>=0.20",
"watermark>=2.3",
"loguru>=0.7",
"albumentations>=1.3",
"pycocotools>=2.0",
"matplotlib>=3.7",
"transformers>=4.30",
"jsonargparse[signatures]>=4.27",
"plotly>=5.0",
"tensorboard>=2.14; extra == \"tensorboard\"",
"mlflow>=2.0; extra == \"mlflow\"",
"wandb>=0.15; extra == \"wandb\"",
"onnx>=1.14; extra == \"onnx\"",
"onnxruntime>=1.16; extra == \"onnx\"",
"onnxscript>=0.6; extra == \"onnx\"",
"tensorboard>=2.14; extra == \"all\"",
"mlflow>=2.0; extra == \"all\"",
"wandb>=0.15; extra == \"all\"",
"albumentations>=1.3; extra == \"all\"",
"opencv-python-headless>=4.8; extra == \"all\"",
"pycocotools>=2.0; extra == \"all\"",
"onnx>=1.14; extra == \"all\"",
"onnxruntime>=1.16; extra == \"all\"",
"onnxscript>=0.6; extra == \"all\"",
"pytest>=7.0; extra == \"dev\"",
"pytest-cov; extra == \"dev\"",
"build; extra == \"dev\"",
"twine; extra == \"dev\"",
"ruff; extra == \"dev\"",
"black; extra == \"dev\"",
"pycocotools>=2.0; extra == \"dev\"",
"tensorboard>=2.14; extra == \"dev\"",
"mlflow>=2.0; extra == \"dev\"",
"wandb>=0.15; extra == \"dev\"",
"albumentations>=1.3; extra == \"dev\"",
"opencv-python-headless>=4.8; extra == \"dev\"",
"plotly>=5.0; extra == \"dev\"",
"transformers>=4.30; extra == \"dev\"",
"onnx>=1.14; extra == \"dev\"",
"onnxruntime>=1.16; extra == \"dev\"",
"onnxscript>=0.6; extra == \"dev\"",
"zensical; extra == \"docs\"",
"mkdocstrings[python]>=0.24; extra == \"docs\""
] | [] | [] | [] | [
"Homepage, https://github.com/theja-vanka/AutoTimm",
"Repository, https://github.com/theja-vanka/AutoTimm",
"Issues, https://github.com/theja-vanka/AutoTimm/issues"
] | twine/6.1.0 CPython/3.13.7 | 2026-02-20T18:58:29.986411 | autotimm-0.7.11.tar.gz | 4,025,670 | e5/ad/fe516a7f672c83c7317ab7872f29779f78ee0855e8efbcc2c83442bc59c3/autotimm-0.7.11.tar.gz | source | sdist | null | false | 8a9107513f669d63cff7852ea0536654 | 851b361d66f478f59a118ee9c409bc6a5dd9fc1ace9dc0765146d0553112a089 | e5adfe516a7f672c83c7317ab7872f29779f78ee0855e8efbcc2c83442bc59c3 | null | [
"LICENSE"
] | 187 |
2.4 | pytest-sbase | 4.47.0 | A complete web automation framework for end-to-end testing. | **[<img src="https://img.shields.io/badge/pypi-pytest--sbase-22AAEE.svg" alt="pypi" />](https://pypi.python.org/pypi/pytest-sbase) is a proxy for [<img src="https://img.shields.io/badge/pypi-seleniumbase-22AAEE.svg" alt="pypi" />](https://pypi.python.org/pypi/seleniumbase)**
****
<!-- SeleniumBase Docs -->
<meta property="og:site_name" content="SeleniumBase">
<meta property="og:title" content="SeleniumBase: Python Web Automation and E2E Testing" />
<meta property="og:description" content="Fast, easy, and reliable Web/UI testing with Python." />
<meta property="og:keywords" content="Python, pytest, selenium, webdriver, testing, automation, seleniumbase, framework, dashboard, recorder, reports, screenshots">
<meta property="og:image" content="https://seleniumbase.github.io/cdn/img/mac_sb_logo_5b.png" />
<link rel="icon" href="https://seleniumbase.github.io/img/logo7.png" />
<h1>SeleniumBase</h1>
<p align="center"><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.github.io/cdn/img/super_logo_sb3.png" alt="SeleniumBase" title="SeleniumBase" width="350" /></a></p>
<p align="center" class="hero__title"><b>All-in-one Browser Automation Framework:<br />Web Crawling / Testing / Scraping / Stealth</b></p>
<p align="center"><a href="https://pypi.python.org/pypi/seleniumbase" target="_blank"><img src="https://img.shields.io/pypi/v/seleniumbase.svg?color=3399EE" alt="PyPI version" /></a> <a href="https://github.com/seleniumbase/SeleniumBase/releases" target="_blank"><img src="https://img.shields.io/github/v/release/seleniumbase/SeleniumBase.svg?color=22AAEE" alt="GitHub version" /></a> <a href="https://seleniumbase.io"><img src="https://img.shields.io/badge/docs-seleniumbase.io-11BBAA.svg" alt="SeleniumBase Docs" /></a> <a href="https://github.com/seleniumbase/SeleniumBase/actions" target="_blank"><img src="https://github.com/seleniumbase/SeleniumBase/workflows/CI%20build/badge.svg" alt="SeleniumBase GitHub Actions" /></a> <a href="https://discord.gg/EdhQTn3EyE" target="_blank"><img src="https://img.shields.io/badge/join-discord-infomational" alt="Join the SeleniumBase chat on Discord"/></a></p>
<p align="center">
<a href="#python_installation">🚀 Start</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/features_list.md">🏰 Features</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/customizing_test_runs.md">🎛️ Options</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/ReadMe.md">📚 Examples</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/console_scripts/ReadMe.md">🌠 Scripts</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/mobile_testing.md">📱 Mobile</a>
<br />
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/method_summary.md">📘 APIs</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md"> 🔠 Formats</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/recorder_mode.md">🔴 Recorder</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/example_logs/ReadMe.md">📊 Dashboard</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/locale_codes.md">🗾 Locales</a> |
<a href="https://seleniumbase.io/devices/?url=seleniumbase.com">💻 Farm</a>
<br />
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/commander.md">🎖️ GUI</a> |
<a href="https://seleniumbase.io/demo_page">📰 TestPage</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/uc_mode.md">👤 UC Mode</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/ReadMe.md">🐙 CDP Mode</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/chart_maker/ReadMe.md">📶 Charts</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/utilities/selenium_grid/ReadMe.md">🌐 Grid</a>
<br />
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/how_it_works.md">👁️ How</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/tree/master/examples/migration/raw_selenium">🚝 Migrate</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/case_plans.md">🗂️ CasePlans</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/tree/master/examples/boilerplates">♻️ Template</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/master_qa/ReadMe.md">🧬 Hybrid</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/tour_examples/ReadMe.md">🚎 Tours</a>
<br />
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/github/workflows/ReadMe.md">🤖 CI/CD</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/js_package_manager.md">🕹️ JSMgr</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/translations.md">🌏 Translator</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/presenter/ReadMe.md">🎞️ Presenter</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/dialog_boxes/ReadMe.md">🛂 Dialog</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/visual_testing/ReadMe.md">🖼️ Visual</a>
<br />
</p>
<p>SeleniumBase is the professional toolkit for web automation activities. Built for testing websites, bypassing CAPTCHAs, enhancing productivity, completing tasks, and scaling your business.</p>
--------
📚 Learn from [**over 200 examples** in the **SeleniumBase/examples/** folder](https://github.com/seleniumbase/SeleniumBase/tree/master/examples).
🐙 Note that <a translate="no" href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/uc_mode.md"><b>UC Mode</b></a> / <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/ReadMe.md"><b>CDP Mode</b></a> (Stealth Mode) have their own ReadMe files.
ℹ️ Most scripts run with raw <code translate="no"><b>python</b></code>, although some scripts use <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md">Syntax Formats</a> that expect <a href="https://docs.pytest.org/en/latest/how-to/usage.html" translate="no"><b>pytest</b></a> (a Python unit-testing framework included with SeleniumBase that can discover, collect, and run tests automatically).
--------
<p align="left">📗 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_google.py">raw_google.py</a>, which performs a Google search:</p>
```python
from seleniumbase import SB
with SB(test=True, uc=True) as sb:
sb.open("https://google.com/ncr")
sb.type('[title="Search"]', "SeleniumBase GitHub page\n")
sb.click('[href*="github.com/seleniumbase/"]')
sb.save_screenshot_to_logs() # ./latest_logs/
print(sb.get_page_title())
```
> `python raw_google.py`
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_google.py"><img src="https://seleniumbase.github.io/cdn/gif/google_search.gif" alt="SeleniumBase Test" title="SeleniumBase Test" width="420" /></a>
--------
<p align="left">📗 Here's an example of bypassing Cloudflare's challenge page: <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/raw_gitlab.py">SeleniumBase/examples/cdp_mode/raw_gitlab.py</a></p>
```python
from seleniumbase import SB
with SB(uc=True, test=True, locale="en") as sb:
url = "https://gitlab.com/users/sign_in"
sb.activate_cdp_mode(url)
sb.uc_gui_click_captcha()
sb.sleep(2)
```
<img src="https://seleniumbase.github.io/other/cf_sec.jpg" title="SeleniumBase" width="332"> <img src="https://seleniumbase.github.io/other/gitlab_bypass.png" title="SeleniumBase" width="288">
--------
<p align="left">📗 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_get_swag.py">test_get_swag.py</a>, which tests an e-commerce site:</p>
```python
from seleniumbase import BaseCase
BaseCase.main(__name__, __file__) # Call pytest
class MyTestClass(BaseCase):
def test_swag_labs(self):
self.open("https://www.saucedemo.com")
self.type("#user-name", "standard_user")
self.type("#password", "secret_sauce\n")
self.assert_element("div.inventory_list")
self.click('button[name*="backpack"]')
self.click("#shopping_cart_container a")
self.assert_text("Backpack", "div.cart_item")
self.click("button#checkout")
self.type("input#first-name", "SeleniumBase")
self.type("input#last-name", "Automation")
self.type("input#postal-code", "77123")
self.click("input#continue")
self.click("button#finish")
self.assert_text("Thank you for your order!")
```
> `pytest test_get_swag.py`
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_get_swag.py"><img src="https://seleniumbase.github.io/cdn/gif/fast_swag_2.gif" alt="SeleniumBase Test" title="SeleniumBase Test" width="480" /></a>
> (The default browser is ``--chrome`` if not set.)
--------
<p align="left">📗 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_coffee_cart.py" target="_blank">test_coffee_cart.py</a>, which verifies an e-commerce site:</p>
```bash
pytest test_coffee_cart.py --demo
```
<p align="left"><a href="https://seleniumbase.io/coffee/" target="_blank"><img src="https://seleniumbase.github.io/cdn/gif/coffee_cart.gif" width="480" alt="SeleniumBase Coffee Cart Test" title="SeleniumBase Coffee Cart Test" /></a></p>
> <p>(<code translate="no">--demo</code> mode slows down tests and highlights actions)</p>
--------
<a id="multiple_examples"></a>
<p align="left">📗 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_demo_site.py" target="_blank">test_demo_site.py</a>, which covers several actions:</p>
```bash
pytest test_demo_site.py
```
<p align="left"><a href="https://seleniumbase.io/demo_page" target="_blank"><img src="https://seleniumbase.github.io/cdn/gif/demo_page_5.gif" width="480" alt="SeleniumBase Example" title="SeleniumBase Example" /></a></p>
> Easy to type, click, select, toggle, drag & drop, and more.
(For more examples, see the <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/ReadMe.md">SeleniumBase/examples/</a> folder.)
--------
<p align="left"><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.github.io/cdn/img/super_logo_sb3.png" alt="SeleniumBase" title="SeleniumBase" width="232" /></a></p>
<blockquote>
<p dir="auto"><strong>Explore the README:</strong></p>
<ul dir="auto">
<li><a href="#install_seleniumbase" ><strong>Get Started / Installation</strong></a></li>
<li><a href="#basic_example_and_usage"><strong>Basic Example / Usage</strong></a></li>
<li><a href="#common_methods" ><strong>Common Test Methods</strong></a></li>
<li><a href="#fun_facts" ><strong>Fun Facts / Learn More</strong></a></li>
<li><a href="#demo_mode_and_debugging"><strong>Demo Mode / Debugging</strong></a></li>
<li><a href="#command_line_options" ><strong>Command-line Options</strong></a></li>
<li><a href="#directory_configuration"><strong>Directory Configuration</strong></a></li>
<li><a href="#seleniumbase_dashboard" ><strong>SeleniumBase Dashboard</strong></a></li>
<li><a href="#creating_visual_reports"><strong>Generating Test Reports</strong></a></li>
</ul>
</blockquote>
--------
<details>
<summary> ▶️ How is <b>SeleniumBase</b> different from raw Selenium? (<b>click to expand</b>)</summary>
<div>
<p>💡 SeleniumBase is a Python framework for browser automation and testing. SeleniumBase uses <a href="https://www.w3.org/TR/webdriver2/#endpoints" target="_blank">Selenium/WebDriver</a> APIs and incorporates test-runners such as <code translate="no">pytest</code>, <code translate="no">pynose</code>, and <code translate="no">behave</code> to provide organized structure, test discovery, test execution, test state (<i>eg. passed, failed, or skipped</i>), and command-line options for changing default settings (<i>eg. browser selection</i>). With raw Selenium, you would need to set up your own options-parser for configuring tests from the command-line.</p>
<p>💡 SeleniumBase's driver manager gives you more control over automatic driver downloads. (Use <code translate="no">--driver-version=VER</code> with your <code translate="no">pytest</code> run command to specify the version.) By default, SeleniumBase will download a driver version that matches your major browser version if not set.</p>
<p>💡 SeleniumBase automatically detects between CSS Selectors and XPath, which means you don't need to specify the type of selector in your commands (<i>but optionally you could</i>).</p>
<p>💡 SeleniumBase methods often perform multiple actions in a single method call. For example, <code translate="no">self.type(selector, text)</code> does the following:<br />1. Waits for the element to be visible.<br />2. Waits for the element to be interactive.<br />3. Clears the text field.<br />4. Types in the new text.<br />5. Presses Enter/Submit if the text ends in <code translate="no">"\n"</code>.<br />With raw Selenium, those actions require multiple method calls.</p>
<p>💡 SeleniumBase uses default timeout values when not set:<br />
✅ <code translate="no">self.click("button")</code><br />
With raw Selenium, methods would fail instantly (<i>by default</i>) if an element needed more time to load:<br />
❌ <code translate="no">self.driver.find_element(by="css selector", value="button").click()</code><br />
(Reliable code is better than unreliable code.)</p>
<p>💡 SeleniumBase lets you change the explicit timeout values of methods:<br />
✅ <code translate="no">self.click("button", timeout=10)</code><br />
With raw Selenium, that requires more code:<br />
❌ <code translate="no">WebDriverWait(driver, 10).until(EC.element_to_be_clickable("css selector", "button")).click()</code><br />
(Simple code is better than complex code.)</p>
<p>💡 SeleniumBase gives you clean error output when a test fails. With raw Selenium, error messages can get very messy.</p>
<p>💡 SeleniumBase gives you the option to generate a dashboard and reports for tests. It also saves screenshots from failing tests to the <code translate="no">./latest_logs/</code> folder. Raw <a href="https://www.selenium.dev/documentation/webdriver/" translate="no" target="_blank">Selenium</a> does not have these options out-of-the-box.</p>
<p>💡 SeleniumBase includes desktop GUI apps for running tests, such as <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/commander.md" translate="no">SeleniumBase Commander</a> for <code translate="no">pytest</code> and <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/behave_bdd/ReadMe.md" translate="no">SeleniumBase Behave GUI</a> for <code translate="no">behave</code>.</p>
<p>💡 SeleniumBase has its own <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/recorder_mode.md">Recorder / Test Generator</a> for creating tests from manual browser actions.</p>
<p>💡 SeleniumBase comes with <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/case_plans.md">test case management software, ("CasePlans")</a>, for organizing tests and step descriptions.</p>
<p>💡 SeleniumBase includes tools for <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/chart_maker/ReadMe.md">building data apps, ("ChartMaker")</a>, which can generate JavaScript from Python.</p>
</div>
</details>
--------
<p>📚 <b>Learn about different ways of writing tests:</b></p>
<p align="left">📗📝 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_simple_login.py">test_simple_login.py</a>, which uses <code translate="no"><a href="https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/fixtures/base_case.py">BaseCase</a></code> class inheritance, and runs with <a href="https://docs.pytest.org/en/latest/how-to/usage.html">pytest</a> or <a href="https://github.com/mdmintz/pynose">pynose</a>. (Use <code translate="no">self.driver</code> to access Selenium's raw <code translate="no">driver</code>.)</p>
```python
from seleniumbase import BaseCase
BaseCase.main(__name__, __file__)
class TestSimpleLogin(BaseCase):
def test_simple_login(self):
self.open("seleniumbase.io/simple/login")
self.type("#username", "demo_user")
self.type("#password", "secret_pass")
self.click('a:contains("Sign in")')
self.assert_exact_text("Welcome!", "h1")
self.assert_element("img#image1")
self.highlight("#image1")
self.click_link("Sign out")
self.assert_text("signed out", "#top_message")
```
<p align="left">📘📝 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_login_sb.py">raw_login_sb.py</a>, which uses the <b><code translate="no">SB</code></b> Context Manager. Runs with pure <code translate="no">python</code>. (Use <code translate="no">sb.driver</code> to access Selenium's raw <code translate="no">driver</code>.)</p>
```python
from seleniumbase import SB
with SB() as sb:
sb.open("seleniumbase.io/simple/login")
sb.type("#username", "demo_user")
sb.type("#password", "secret_pass")
sb.click('a:contains("Sign in")')
sb.assert_exact_text("Welcome!", "h1")
sb.assert_element("img#image1")
sb.highlight("#image1")
sb.click_link("Sign out")
sb.assert_text("signed out", "#top_message")
```
<p align="left">📙📝 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_login_driver.py">raw_login_driver.py</a>, which uses the <b><code translate="no">Driver</code></b> Manager. Runs with pure <code translate="no">python</code>. (The <code>driver</code> is an improved version of Selenium's raw <code translate="no">driver</code>, with more methods.)</p>
```python
from seleniumbase import Driver
driver = Driver()
try:
driver.open("seleniumbase.io/simple/login")
driver.type("#username", "demo_user")
driver.type("#password", "secret_pass")
driver.click('a:contains("Sign in")')
driver.assert_exact_text("Welcome!", "h1")
driver.assert_element("img#image1")
driver.highlight("#image1")
driver.click_link("Sign out")
driver.assert_text("signed out", "#top_message")
finally:
driver.quit()
```
--------
<a id="python_installation"></a>
<h2><img src="https://seleniumbase.github.io/cdn/img/python_logo.png" title="SeleniumBase" width="42" /> Set up Python & Git:</h2>
<a href="https://www.python.org/downloads/"><img src="https://img.shields.io/pypi/pyversions/seleniumbase.svg?color=FACE42" title="Supported Python Versions" /></a>
🔵 Add <b><a href="https://www.python.org/downloads/">Python</a></b> and <b><a href="https://git-scm.com/">Git</a></b> to your System PATH.
🔵 Using a <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/virtualenv_instructions.md">Python virtual env</a> is recommended.
<a id="install_seleniumbase"></a>
<h2><img src="https://seleniumbase.github.io/img/logo7.png" title="SeleniumBase" width="32" /> Install SeleniumBase:</h2>
**You can install ``seleniumbase`` from [PyPI](https://pypi.org/project/seleniumbase/) or [GitHub](https://github.com/seleniumbase/SeleniumBase):**
🔵 **How to install ``seleniumbase`` from PyPI:**
```bash
pip install seleniumbase
```
* (Add ``--upgrade`` OR ``-U`` to upgrade SeleniumBase.)
* (Add ``--force-reinstall`` to upgrade indirect packages.)
* (Use ``pip3`` if multiple versions of Python are present.)
🔵 **How to install ``seleniumbase`` from a GitHub clone:**
```bash
git clone https://github.com/seleniumbase/SeleniumBase.git
cd SeleniumBase/
pip install -e .
```
🔵 **How to upgrade an existing install from a GitHub clone:**
```bash
git pull
pip install -e .
```
🔵 **Type ``seleniumbase`` or ``sbase`` to verify that SeleniumBase was installed successfully:**
```bash
___ _ _ ___
/ __| ___| |___ _ _ (_)_ _ _ __ | _ ) __ _ ______
\__ \/ -_) / -_) ' \| | \| | ' \ | _ \/ _` (_-< -_)
|___/\___|_\___|_||_|_|\_,_|_|_|_\|___/\__,_/__|___|
----------------------------------------------------
╭──────────────────────────────────────────────────╮
│ * USAGE: "seleniumbase [COMMAND] [PARAMETERS]" │
│ * OR: "sbase [COMMAND] [PARAMETERS]" │
│ │
│ COMMANDS: PARAMETERS / DESCRIPTIONS: │
│ get / install [DRIVER_NAME] [OPTIONS] │
│ methods (List common Python methods) │
│ options (List common pytest options) │
│ behave-options (List common behave options) │
│ gui / commander [OPTIONAL PATH or TEST FILE] │
│ behave-gui (SBase Commander for Behave) │
│ caseplans [OPTIONAL PATH or TEST FILE] │
│ mkdir [DIRECTORY] [OPTIONS] │
│ mkfile [FILE.py] [OPTIONS] │
│ mkrec / codegen [FILE.py] [OPTIONS] │
│ recorder (Open Recorder Desktop App.) │
│ record (If args: mkrec. Else: App.) │
│ mkpres [FILE.py] [LANG] │
│ mkchart [FILE.py] [LANG] │
│ print [FILE] [OPTIONS] │
│ translate [SB_FILE.py] [LANG] [ACTION] │
│ convert [WEBDRIVER_UNITTEST_FILE.py] │
│ extract-objects [SB_FILE.py] │
│ inject-objects [SB_FILE.py] [OPTIONS] │
│ objectify [SB_FILE.py] [OPTIONS] │
│ revert-objects [SB_FILE.py] [OPTIONS] │
│ encrypt / obfuscate │
│ decrypt / unobfuscate │
│ proxy (Start a basic proxy server) │
│ download server (Get Selenium Grid JAR file) │
│ grid-hub [start|stop] [OPTIONS] │
│ grid-node [start|stop] --hub=[HOST/IP] │
│ │
│ * EXAMPLE => "sbase get chromedriver stable" │
│ * For command info => "sbase help [COMMAND]" │
│ * For info on all commands => "sbase --help" │
╰──────────────────────────────────────────────────╯
```
<h3>🔵 Downloading webdrivers:</h3>
✅ SeleniumBase automatically downloads webdrivers as needed, such as ``chromedriver``.
<div></div>
<details>
<summary> ▶️ Here's sample output from a chromedriver download. (<b>click to expand</b>)</summary>
```bash
*** chromedriver to download = 131.0.6778.108 (Latest Stable)
Downloading chromedriver-mac-arm64.zip from:
https://storage.googleapis.com/chrome-for-testing-public/131.0.6778.108/mac-arm64/chromedriver-mac-arm64.zip ...
Download Complete!
Extracting ['chromedriver'] from chromedriver-mac-arm64.zip ...
Unzip Complete!
The file [chromedriver] was saved to:
~/github/SeleniumBase/seleniumbase/drivers/
chromedriver
Making [chromedriver 131.0.6778.108] executable ...
[chromedriver 131.0.6778.108] is now ready for use!
```
</details>
<a id="basic_example_and_usage"></a>
<h2><img src="https://seleniumbase.github.io/img/logo7.png" title="SeleniumBase" width="32" /> Basic Example / Usage:</h2>
🔵 If you've cloned SeleniumBase, you can run tests from the [examples/](https://github.com/seleniumbase/SeleniumBase/tree/master/examples) folder.
<p align="left">Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py">my_first_test.py</a>:</p>
```bash
cd examples/
pytest my_first_test.py
```
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py"><img src="https://seleniumbase.github.io/cdn/gif/fast_swag_2.gif" alt="SeleniumBase Test" title="SeleniumBase Test" width="480" /></a>
<p align="left"><b>Here's the full code for <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py">my_first_test.py</a>:</b></p>
```python
from seleniumbase import BaseCase
BaseCase.main(__name__, __file__)
class MyTestClass(BaseCase):
def test_swag_labs(self):
self.open("https://www.saucedemo.com")
self.type("#user-name", "standard_user")
self.type("#password", "secret_sauce\n")
self.assert_element("div.inventory_list")
self.assert_exact_text("Products", "span.title")
self.click('button[name*="backpack"]')
self.click("#shopping_cart_container a")
self.assert_exact_text("Your Cart", "span.title")
self.assert_text("Backpack", "div.cart_item")
self.click("button#checkout")
self.type("#first-name", "SeleniumBase")
self.type("#last-name", "Automation")
self.type("#postal-code", "77123")
self.click("input#continue")
self.assert_text("Checkout: Overview")
self.assert_text("Backpack", "div.cart_item")
self.assert_text("29.99", "div.inventory_item_price")
self.click("button#finish")
self.assert_exact_text("Thank you for your order!", "h2")
self.assert_element('img[alt="Pony Express"]')
self.js_click("a#logout_sidebar_link")
self.assert_element("div#login_button_container")
```
* By default, **[CSS Selectors](https://www.w3schools.com/cssref/css_selectors.asp)** are used for finding page elements.
* If you're new to CSS Selectors, games like [CSS Diner](http://flukeout.github.io/) can help you learn.
* For more reading, [here's an advanced guide on CSS attribute selectors](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors).
<a id="common_methods"></a>
<h3><img src="https://seleniumbase.github.io/img/logo7.png" title="SeleniumBase" width="32" /> Here are some common SeleniumBase methods:</h3>
```python
self.open(url) # Navigate the browser window to the URL.
self.type(selector, text) # Update the field with the text.
self.click(selector) # Click the element with the selector.
self.click_link(link_text) # Click the link containing text.
self.go_back() # Navigate back to the previous URL.
self.select_option_by_text(dropdown_selector, option)
self.hover_and_click(hover_selector, click_selector)
self.drag_and_drop(drag_selector, drop_selector)
self.get_text(selector) # Get the text from the element.
self.get_current_url() # Get the URL of the current page.
self.get_page_source() # Get the HTML of the current page.
self.get_attribute(selector, attribute) # Get element attribute.
self.get_title() # Get the title of the current page.
self.switch_to_frame(frame) # Switch into the iframe container.
self.switch_to_default_content() # Leave the iframe container.
self.open_new_window() # Open a new window in the same browser.
self.switch_to_window(window) # Switch to the browser window.
self.switch_to_default_window() # Switch to the original window.
self.get_new_driver(OPTIONS) # Open a new driver with OPTIONS.
self.switch_to_driver(driver) # Switch to the browser driver.
self.switch_to_default_driver() # Switch to the original driver.
self.wait_for_element(selector) # Wait until element is visible.
self.is_element_visible(selector) # Return element visibility.
self.is_text_visible(text, selector) # Return text visibility.
self.sleep(seconds) # Do nothing for the given amount of time.
self.save_screenshot(name) # Save a screenshot in .png format.
self.assert_element(selector) # Verify the element is visible.
self.assert_text(text, selector) # Verify text in the element.
self.assert_exact_text(text, selector) # Verify text is exact.
self.assert_title(title) # Verify the title of the web page.
self.assert_downloaded_file(file) # Verify file was downloaded.
self.assert_no_404_errors() # Verify there are no broken links.
self.assert_no_js_errors() # Verify there are no JS errors.
```
🔵 For the complete list of SeleniumBase methods, see: <b><a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/method_summary.md">Method Summary</a></b>
<a id="fun_facts"></a>
<h2><img src="https://seleniumbase.github.io/img/logo7.png" title="SeleniumBase" width="32" /> Fun Facts / Learn More:</h2>
<p>✅ SeleniumBase automatically handles common <a href="https://www.selenium.dev/documentation/webdriver/" target="_blank">WebDriver</a> actions such as launching web browsers before tests, saving screenshots during failures, and closing web browsers after tests.</p>
<p>✅ SeleniumBase lets you customize tests via <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/customizing_test_runs.md">command-line options</a>.</p>
<p>✅ SeleniumBase uses simple syntax for commands. Example:</p>
```python
self.type("input", "dogs\n") # (The "\n" presses ENTER)
```
Most SeleniumBase scripts can be run with <code translate="no">pytest</code>, <code translate="no">pynose</code>, or pure <code translate="no">python</code>. Not all test runners can run all test formats. For example, tests that use the ``sb`` pytest fixture can only be run with ``pytest``. (See <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md">Syntax Formats</a>) There's also a <a href="https://behave.readthedocs.io/en/stable/gherkin.html#features" target="_blank">Gherkin</a> test format that runs with <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/behave_bdd/ReadMe.md">behave</a>.
```bash
pytest coffee_cart_tests.py --rs
pytest test_sb_fixture.py --demo
pytest test_suite.py --rs --html=report.html --dashboard
pynose basic_test.py --mobile
pynose test_suite.py --headless --report --show-report
python raw_sb.py
python raw_test_scripts.py
behave realworld.feature
behave calculator.feature -D rs -D dashboard
```
<p>✅ <code translate="no">pytest</code> includes automatic test discovery. If you don't specify a specific file or folder to run, <code translate="no">pytest</code> will automatically search through all subdirectories for tests to run based on the following criteria:</p>
* Python files that start with ``test_`` or end with ``_test.py``.
* Python methods that start with ``test_``.
With a SeleniumBase [pytest.ini](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/pytest.ini) file present, you can modify default discovery settings. The Python class name can be anything because ``seleniumbase.BaseCase`` inherits ``unittest.TestCase`` to trigger autodiscovery.
<p>✅ You can do a pre-flight check to see which tests would get discovered by <code translate="no">pytest</code> before the actual run:</p>
```bash
pytest --co -q
```
<p>✅ You can be more specific when calling <code translate="no">pytest</code> or <code translate="no">pynose</code> on a file:</p>
```bash
pytest [FILE_NAME.py]::[CLASS_NAME]::[METHOD_NAME]
pynose [FILE_NAME.py]:[CLASS_NAME].[METHOD_NAME]
```
<p>✅ No More Flaky Tests! SeleniumBase methods automatically wait for page elements to finish loading before interacting with them (<i>up to a timeout limit</i>). This means <b>you no longer need random <span><code translate="no">time.sleep()</code></span> statements</b> in your scripts.</p>
<img src="https://img.shields.io/badge/Flaky%20Tests%3F-%20NO%21-11BBDD.svg" alt="NO MORE FLAKY TESTS!" />
✅ SeleniumBase supports all major browsers and operating systems:
<p><b>Browsers:</b> Chrome, Edge, Firefox, and Safari.</p>
<p><b>Systems:</b> Linux/Ubuntu, macOS, and Windows.</p>
✅ SeleniumBase works on all popular CI/CD platforms:
<p><a href="https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/github/workflows/ReadMe.md"><img alt="GitHub Actions integration" src="https://img.shields.io/badge/GitHub_Actions-12B2C2.svg?logo=GitHubActions&logoColor=CFFFC2" /></a> <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/azure/jenkins/ReadMe.md"><img alt="Jenkins integration" src="https://img.shields.io/badge/Jenkins-32B242.svg?logo=jenkins&logoColor=white" /></a> <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/azure/azure_pipelines/ReadMe.md"><img alt="Azure integration" src="https://img.shields.io/badge/Azure-2288EE.svg?logo=AzurePipelines&logoColor=white" /></a> <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/google_cloud/ReadMe.md"><img alt="Google Cloud integration" src="https://img.shields.io/badge/Google_Cloud-11CAE8.svg?logo=GoogleCloud&logoColor=EE0066" /></a> <a href="#utilizing_advanced_features"><img alt="AWS integration" src="https://img.shields.io/badge/AWS-4488DD.svg?logo=AmazonAWS&logoColor=FFFF44" /></a> <a href="https://en.wikipedia.org/wiki/Personal_computer" target="_blank"><img alt="Your Computer" src="https://img.shields.io/badge/💻_Your_Computer-44E6E6.svg" /></a></p>
<p>✅ SeleniumBase includes an automated/manual hybrid solution called <b><a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/master_qa/ReadMe.md">MasterQA</a></b> to speed up manual testing with automation while manual testers handle validation.</p>
<p>✅ SeleniumBase supports <a href="https://github.com/seleniumbase/SeleniumBase/tree/master/examples/offline_examples">running tests while offline</a> (<i>assuming webdrivers have previously been downloaded when online</i>).</p>
<p>✅ For a full list of SeleniumBase features, <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/features_list.md">Click Here</a>.</p>
<a id="demo_mode_and_debugging"></a>
<h2><img src="https://seleniumbase.github.io/img/logo7.png" title="SeleniumBase" width="32" /> Demo Mode / Debugging:</h2>
🔵 <b>Demo Mode</b> helps you see what a test is doing. If a test is moving too fast for your eyes, run it in <b>Demo Mode</b> to pause the browser briefly between actions, highlight page elements being acted on, and display assertions:
```bash
pytest my_first_test.py --demo
```
🔵 ``time.sleep(seconds)`` can be used to make a test wait at a specific spot:
```python
import time; time.sleep(3) # Do nothing for 3 seconds.
```
🔵 **Debug Mode** with Python's built-in **[pdb](https://docs.python.org/3/library/pdb.html)** library helps you debug tests:
```python
import pdb; pdb.set_trace()
import pytest; pytest.set_trace()
breakpoint() # Shortcut for "import pdb; pdb.set_trace()"
```
> (**``pdb``** commands: ``n``, ``c``, ``s``, ``u``, ``d`` => ``next``, ``continue``, ``step``, ``up``, ``down``)
🔵 To pause an active test that throws an exception or error, (*and keep the browser window open while **Debug Mode** begins in the console*), add **``--pdb``** as a ``pytest`` option:
```bash
pytest test_fail.py --pdb
```
🔵 To start tests in Debug Mode, add **``--trace``** as a ``pytest`` option:
```bash
pytest test_coffee_cart.py --trace
```
<a href="https://github.com/mdmintz/pdbp"><img src="https://seleniumbase.github.io/cdn/gif/coffee_pdbp.gif" alt="SeleniumBase test with the pdbp (Pdb+) debugger" title="SeleniumBase test with the pdbp (Pdb+) debugger" /></a>
<a id="command_line_options"></a>
<h2>🔵 Command-line Options:</h2>
<a id="pytest_options"></a>
✅ Here are some useful command-line options that come with <code translate="no">pytest</code>:
```bash
-v # Verbose mode. Prints the full name of each test and shows more details.
-q # Quiet mode. Print fewer details in the console output when running tests.
-x # Stop running the tests after the first failure is reached.
--html=report.html # Creates a detailed pytest-html report after tests finish.
--co | --collect-only # Show what tests would get run. (Without running them)
--co -q # (Both options together!) - Do a dry run with full test names shown.
-n=NUM # Multithread the tests using that many threads. (Speed up test runs!)
-s # See print statements. (Should be on by default with pytest.ini present.)
--junit-xml=report.xml # Creates a junit-xml report after tests finish.
--pdb # If a test fails, enter Post Mortem Debug Mode. (Don't use with CI!)
--trace # Enter Debug Mode at the beginning of each test. (Don't use with CI!)
-m=MARKER # Run tests with the specified pytest marker.
```
<a id="new_pytest_options"></a>
✅ SeleniumBase provides additional <code translate="no">pytest</code> command-line options for tests:
```bash
--browser=BROWSER # (The web browser to use. Default: "chrome".)
--chrome # (Shortcut for "--browser=chrome". On by default.)
--edge # (Shortcut for "--browser=edge".)
--firefox # (Shortcut for "--browser=firefox".)
--safari # (Shortcut for "--browser=safari".)
--settings-file=FILE # (Override default SeleniumBase settings.)
--env=ENV # (Set the test env. Access with "self.env" in tests.)
--account=STR # (Set account. Access with "self.account" in tests.)
--data=STRING # (Extra test data. Access with "self.data" in tests.)
--var1=STRING # (Extra test data. Access with "self.var1" in tests.)
--var2=STRING # (Extra test data. Access with "self.var2" in tests.)
--var3=STRING # (Extra test data. Access with "self.var3" in tests.)
--variables=DICT # (Extra test data. Access with "self.variables".)
--user-data-dir=DIR # (Set the Chrome user data directory to use.)
--protocol=PROTOCOL # (The Selenium Grid protocol: http|https.)
--server=SERVER # (The Selenium Grid server/IP used for tests.)
--port=PORT # (The Selenium Grid port used by the test server.)
--cap-file=FILE # (The web browser's desired capabilities to use.)
--cap-string=STRING # (The web browser's desired capabilities to use.)
--proxy=SERVER:PORT # (Connect to a proxy server:port as tests are running)
--proxy=USERNAME:PASSWORD@SERVER:PORT # (Use an authenticated proxy server)
--proxy-bypass-list=STRING # (";"-separated hosts to bypass, Eg "*.foo.com")
--proxy-pac-url=URL # (Connect to a proxy server using a PAC_URL.pac file.)
--proxy-pac-url=USERNAME:PASSWORD@URL # (Authenticated proxy with PAC URL.)
--proxy-driver # (If a driver download is needed, will use: --proxy=PROXY.)
--multi-proxy # (Allow multiple authenticated proxies when multi-threaded.)
--agent=STRING # (Modify the web browser's User-Agent string.)
--mobile # (Use the mobile device emulator while running tests.)
--metrics=STRING # (Set mobile metrics: "CSSWidth,CSSHeight,PixelRatio".)
--chromium-arg="ARG=N,ARG2" # (Set Chromium args, ","-separated, no spaces.)
--firefox-arg="ARG=N,ARG2" # (Set Firefox args, comma-separated, no spaces.)
--firefox-pref=SET # (Set a Firefox preference:value set, comma-separated.)
--extension-zip=ZIP # (Load a Chrome Extension .zip|.crx, comma-separated.)
--extension-dir=DIR # (Load a Chrome Extension directory, comma-separated.)
--disable-features="F1,F2" # (Disable features, comma-separated, no spaces.)
--binary-location=PATH # (Set path of the Chromium browser binary to use.)
--driver-version=VER # (Set the chromedriver or uc_driver version to use.)
--sjw # (Skip JS Waits for readyState to be "complete" or Angular to load.)
--wfa # (Wait for AngularJS to be done loading after specific web actions.)
--pls=PLS # (Set pageLoadStrategy on Chrome: "normal", "eager", or "none".)
--headless # (The default headless mode. Linux uses this mode by default.)
--headless1 # (Use Chrome's old headless mode. Fast, but has limitations.)
--headless2 # (Use Chrome's | text/markdown | Michael Mintz | mdmintz@gmail.com | Michael Mintz | null | MIT | null | [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Environment :: MacOS X",
"Environment :: Win32 (MS Windows)",
"Environment :: Web Environment",
"Framework :: Pytest",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Internet",
"Topic :: Scientific/Engineering",
"Topic :: Software Development",
"Topic :: Software Development :: Quality Assurance",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Testing",
"Topic :: Software Development :: Testing :: Acceptance",
"Topic :: Software Development :: Testing :: Traffic Generation",
"Topic :: Utilities"
] | [
"Windows"
] | https://github.com/seleniumbase/SeleniumBase | null | >=3.9 | [] | [] | [] | [
"seleniumbase>=4.47.0"
] | [] | [] | [] | [
"Homepage, https://github.com/seleniumbase/SeleniumBase",
"Changelog, https://github.com/seleniumbase/SeleniumBase/releases",
"Download, https://pypi.org/project/seleniumbase/#files",
"Blog, https://seleniumbase.com/",
"Discord, https://discord.gg/EdhQTn3EyE",
"PyPI, https://pypi.org/project/seleniumbase/",
"Source, https://github.com/seleniumbase/SeleniumBase",
"Repository, https://github.com/seleniumbase/SeleniumBase",
"Documentation, https://seleniumbase.io/"
] | twine/6.2.0 CPython/3.11.9 | 2026-02-20T18:58:21.446508 | pytest_sbase-4.47.0.tar.gz | 68,018 | 8f/10/aa429c180b838535ff2ed7f954a5260946f5492fe46f2ff94974fe28edd5/pytest_sbase-4.47.0.tar.gz | source | sdist | null | false | 5bfa8a224901502eb741a0581bb6c3ff | 361cdc35302c6ae1299d82fe7909fa2e6b12f92c32054e8a5d3e2efd5d4c1aca | 8f10aa429c180b838535ff2ed7f954a5260946f5492fe46f2ff94974fe28edd5 | null | [] | 174 |
2.4 | kiln3d | 0.2.1 | MCP server + CLI for AI agents to control 3D printers (OctoPrint, Moonraker, Bambu Lab, Prusa Link) — 273 tools for print farm automation | # Kiln
<!-- mcp-name: io.github.codeofaxel/kiln -->
Agentic infrastructure for physical fabrication. Kiln enables AI agents to design, slice, queue, monitor, and fulfill 3D print jobs through a unified MCP (Model Context Protocol) server and CLI.
## What Kiln Does
An agent can go from intent to physical object with zero human intervention:
```
Agent: "Print this sensor mount"
→ Kiln validates the file
→ Checks printer readiness
→ Uploads G-code
→ Starts print
→ Monitors progress
→ Reports completion
```
## Quick Start
### 1. Install
```bash
# From PyPI
pip install kiln3d
# From source (development)
pip install -e ".[dev]"
```
### 2. Configure
```bash
# Option A: Environment variables
export KILN_PRINTER_TYPE=octoprint
export KILN_PRINTER_HOST=http://octopi.local
export KILN_PRINTER_API_KEY=your_api_key
# Option B: CLI auth (saves to ~/.kiln/config.yaml)
kiln auth --name my-printer --host http://octopi.local --type octoprint --api-key YOUR_KEY
```
### 3. Run
```bash
# CLI
kiln status
kiln print model.gcode
# MCP Server
kiln serve
```
### 4. Connect from Claude Desktop
Add to `~/.config/Claude/claude_desktop_config.json`:
```json
{
"mcpServers": {
"kiln": {
"command": "kiln",
"args": ["serve"],
"env": {
"KILN_PRINTER_TYPE": "octoprint",
"KILN_PRINTER_HOST": "http://octopi.local",
"KILN_PRINTER_API_KEY": "your_api_key"
}
}
}
}
```
## Supported Printers
| Backend | Status | Printers |
|---------|--------|----------|
| **OctoPrint** | Stable | Any OctoPrint-connected printer (Prusa, Ender, custom) |
| **Moonraker** | Stable | Klipper-based printers (Voron, Ratrig, etc.) |
| **Bambu Lab** | Stable | X1C, P1S, A1 (via LAN MQTT + FTPS) |
| **Prusa Link** | Stable | MK4, XL, Mini+ (local REST API — type: `prusaconnect`) |
## Features
- **273 MCP tools** for full printer control, fleet management, slicing, model generation, marketplace publishing, and fulfillment
- **107 CLI commands** with `--json` output for agent consumption
- **Multi-printer fleet** management with job queue and background scheduler
- **Model marketplaces** — search/download from MyMiniFactory, Cults3D (Thingiverse deprecated — acquired by MMF, Feb 2026)
- **Slicer integration** — PrusaSlicer and OrcaSlicer with auto-detection
- **Text-to-model generation** — Meshy AI, Tripo3D, Stability AI, OpenSCAD with auto-discovery registry
- **Printability analysis** — overhang detection, thin wall analysis, auto-orientation, support estimation
- **Print DNA** — model fingerprinting, crowd-sourced print settings, intelligent settings prediction
- **Marketplace publish** — one-click publish to Thingiverse/MyMiniFactory/Thangs with print "birth certificate"
- **Revenue tracking** — per-model creator analytics, 2.5% platform fee on Kiln-published models
- **Print-as-a-Service** — local vs fulfillment cost comparison, order lifecycle management
- **Failure recovery** — 9 failure types classified, automated recovery planning
- **Multi-printer splitting** — round-robin and assembly-based job distribution across fleets
- **Generation feedback loop** — failed print → improved prompt with printability constraints
- **Smart material routing** — intent-based material recommendations (8 materials, printer capability aware)
- **Community print registry** — opt-in crowd-sourced settings ("Waze for 3D printing")
- **Fulfillment services** — outsource to Craftcloud (150+ print services, no API key required)
- **Safety first** — pre-flight checks, G-code validation, temperature limits, optional auth
- **Webhooks** — HMAC-signed event notifications for job lifecycle
- **OTA firmware updates** — check, update, and rollback printer firmware
## Architecture
```
AI Agent (Claude, GPT, custom)
|
| CLI or MCP (Model Context Protocol)
v
+--------------------+
| Kiln |
+--------------------+
| | | |
v v v v
OctoPrint Moonraker Bambu PrusaConnect
| | | |
v v v v
Prusa Voron X1C/P1S MK4/XL
```
## Development
```bash
pip install -e ".[dev]"
cd kiln && python -m pytest tests/ -v # 6,339 tests
```
## License
MIT
| text/markdown | Kiln Contributors | null | null | null | MIT | 3d-printing, mcp, mcp-server, model-context-protocol, ai-agent, agent, llm, automation, fabrication, manufacturing, print-farm, octoprint, moonraker, klipper, bambu, bambu-lab, prusa, prusa-link, elegoo, gcode, slicer, prusaslicer, orcaslicer, iot, smart-manufacturing | [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Manufacturing",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Printing",
"Topic :: Scientific/Engineering",
"Topic :: Home Automation",
"Topic :: System :: Hardware"
] | [] | null | null | >=3.10 | [] | [] | [] | [
"mcp>=1.0",
"requests>=2.25",
"pyyaml>=5.4",
"pydantic>=2.0",
"click>=8.0",
"zeroconf>=0.80",
"rich>=12.0",
"paho-mqtt>=2.0",
"cryptography>=41.0",
"websocket-client>=1.6; extra == \"elegoo\"",
"psycopg2-binary>=2.9; extra == \"postgres\"",
"fastapi>=0.100; extra == \"rest\"",
"uvicorn[standard]>=0.25; extra == \"rest\"",
"stripe>=5.0; extra == \"stripe\"",
"stripe>=5.0; extra == \"payments\"",
"cryptography>=41.0; extra == \"payments\"",
"pyserial>=3.5; extra == \"serial\"",
"pytest>=7.0; extra == \"dev\"",
"pytest-cov>=4.0; extra == \"dev\"",
"pytest-mock>=3.6; extra == \"dev\"",
"responses>=0.20; extra == \"dev\""
] | [] | [] | [] | [
"Homepage, https://kiln3d.com",
"Documentation, https://kiln3d.com/docs",
"Repository, https://github.com/codeofaxel/Kiln",
"Issues, https://github.com/codeofaxel/Kiln/issues",
"Changelog, https://github.com/codeofaxel/Kiln/releases"
] | twine/6.1.0 CPython/3.13.7 | 2026-02-20T18:58:12.288896 | kiln3d-0.2.1.tar.gz | 1,151,590 | 70/4f/508b70e9bad2925275319678fccf862020378f5317d31d463fbca3339800/kiln3d-0.2.1.tar.gz | source | sdist | null | false | b5b0ac178fb5f428ac3ad88d7f53b849 | 78c949dd65d83a5dae90a4fc2a9e1b4ad46135fc6a98291d64c576192eb1aaac | 704f508b70e9bad2925275319678fccf862020378f5317d31d463fbca3339800 | null | [] | 168 |
2.1 | odoo-addon-l10n-br-fiscal-closing | 17.0.1.0.0.2 | Period fiscal closing | .. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association
============================
Fechamento fiscal do período
============================
..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:016dd241bd7f761aee3116fa78c5c70076fc6b4120b190b9607448ca2c49222a
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--brazil-lightgray.png?logo=github
:target: https://github.com/OCA/l10n-brazil/tree/17.0/l10n_br_fiscal_closing
:alt: OCA/l10n-brazil
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/l10n-brazil-17-0/l10n-brazil-17-0-l10n_br_fiscal_closing
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-brazil&target_branch=17.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
Este módulo permite a exportação dos documentos fiscais por período.
**Table of contents**
.. contents::
:local:
Installation
============
Configuration
=============
Usage
=====
Abra o menu Fiscal>Contador>Fechamento Fiscal e defina as exportações de
documentos fiscais por período.
Obs. No caso de documentos emitidos pelos parceiros, os arquivos
exportados serão aqueles que estão como anexo do documento fiscal.
Known issues / Roadmap
======================
Changelog
=========
Bug Tracker
===========
Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-brazil/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/l10n-brazil/issues/new?body=module:%20l10n_br_fiscal_closing%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Do not contact contributors directly about support or help with technical issues.
Credits
=======
Authors
-------
* KMEE
Contributors
------------
- `KMEE <https://www.kmee.com.br>`__:
- Luis Felipe Mileo <mileo@kmee.com.br>
- Luis Otavio Malta Conceição <luis.malta@kmee.com.br>
- `Akretion <https://www.akretion.com/pt-BR>`__:
- Renato Lima <renato.lima@akretion.com.br>
- `Escodoo <https://www.escodoo.com.br>`__:
- Marcel Savegnago <marcel.savegnago@escodoo.com.br>
Other credits
-------------
Maintainers
-----------
This module is maintained by the OCA.
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
This module is part of the `OCA/l10n-brazil <https://github.com/OCA/l10n-brazil/tree/17.0/l10n_br_fiscal_closing>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
| text/x-rst | KMEE,Odoo Community Association (OCA) | support@odoo-community.org | null | null | AGPL-3 | null | [
"Programming Language :: Python",
"Framework :: Odoo",
"Framework :: Odoo :: 17.0",
"License :: OSI Approved :: GNU Affero General Public License v3"
] | [] | https://github.com/OCA/l10n-brazil | null | >=3.10 | [] | [] | [] | [
"erpbrasil.base",
"odoo-addon-l10n_br_fiscal_edi<17.1dev,>=17.0dev",
"odoo<17.1dev,>=17.0a"
] | [] | [] | [] | [] | twine/6.2.0 CPython/3.12.3 | 2026-02-20T18:58:11.821470 | odoo_addon_l10n_br_fiscal_closing-17.0.1.0.0.2-py3-none-any.whl | 39,019 | cb/8d/f56d0df4512a27acc76d8ffb3c007a9e94aed384046ad0b2e24a4a7580a8/odoo_addon_l10n_br_fiscal_closing-17.0.1.0.0.2-py3-none-any.whl | py3 | bdist_wheel | null | false | 1a823c5a32c1d01740b440b77914083e | b0f512cd046762c9c52d38e8840f42cbfff9df8b0ae2c16e8bfb0b65714c504e | cb8df56d0df4512a27acc76d8ffb3c007a9e94aed384046ad0b2e24a4a7580a8 | null | [] | 79 |
2.4 | cacheguardian | 0.1.0 | Universal prompt cache optimizer for Anthropic, OpenAI & Gemini | <p align="center">
<img src="https://img.shields.io/badge/python-3.10+-blue.svg" alt="Python 3.10+">
<img src="https://img.shields.io/badge/version-0.1.0-green.svg" alt="Version 0.1.0">
<img src="https://img.shields.io/badge/tests-125%20passed-brightgreen.svg" alt="Tests 125 passed">
<img src="https://img.shields.io/badge/license-MIT-lightgrey.svg" alt="MIT License">
</p>
<h1 align="center">CacheGuardian</h1>
<p align="center">
<strong>Stop overpaying for LLM API calls you've already made.</strong>
</p>
<p align="center">
A drop-in Python middleware that wraps Anthropic, OpenAI, and Gemini SDKs to<br>
automatically optimize prompt caching and show you exactly how much money you're saving.
</p>
---
## The Problem
Every major LLM provider offers prompt caching — cached tokens cost **10-90% less** than regular input tokens. But developers silently break their cache due to non-obvious pitfalls:
- Non-deterministic tool ordering
- System prompt mutations between requests
- Model switches mid-session
- Dynamic content placed before static content
- And [dozens of other subtle mistakes](https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching)
The result? You pay **full price** for tokens the provider *already computed*, and you don't even know it's happening. The only signal you get is a number buried in the API response.
## The Solution
CacheGuardian wraps your existing SDK client in **one line of code**. It detects cache breaks locally in **< 1 millisecond**, automatically fixes the most common mistakes, and logs exactly how much money you're saving — or wasting — on every single call.
```python
import cacheguardian
import anthropic
# Before: client = anthropic.Anthropic()
client = cacheguardian.wrap(anthropic.Anthropic())
# Everything else stays exactly the same.
# CacheGuardian works silently in the background.
response = client.messages.create(
model="claude-sonnet-4-20250514",
max_tokens=1024,
system="You are a helpful assistant.",
tools=[...],
messages=[...]
)
```
```
[cacheguardian] L1 HIT | Cache hit 94.2% | Saved $0.0340 | Session total: $1.24 saved
```
---
## Installation
```bash
pip install cacheguardian
```
Then install it alongside the provider(s) you use:
```bash
# Anthropic Claude
pip install cacheguardian anthropic
# OpenAI GPT / o-series
pip install cacheguardian openai
# Google Gemini
pip install cacheguardian google-genai
# Optional: Redis for distributed caching (L2)
pip install cacheguardian redis
```
**Requirements:** Python 3.10+
---
## Quick Start
### Anthropic
```python
import cacheguardian
import anthropic
client = cacheguardian.wrap(anthropic.Anthropic())
response = client.messages.create(
model="claude-sonnet-4-20250514",
max_tokens=1024,
system="You are a helpful coding assistant.",
tools=[
{
"name": "search_code",
"description": "Search the codebase",
"input_schema": {
"type": "object",
"properties": {"query": {"type": "string"}},
},
}
],
messages=[{"role": "user", "content": "Find all TODO comments"}],
)
```
**What CacheGuardian does automatically:**
| Optimization | What it does |
|---|---|
| Injects `cache_control` | Adds top-level auto-caching if you forgot it |
| Sorts tools | Alphabetical by name — prevents ordering-based misses |
| Stabilizes JSON keys | Sorts all dict keys recursively for consistent hashing |
| Intermediate breakpoints | Adds `cache_control` markers every 15 messages when you exceed 20 blocks |
| Smart TTL | Switches from 5-minute to 1-hour TTL when your request intervals are > 5 min |
### OpenAI
```python
import cacheguardian
import openai
client = cacheguardian.wrap(openai.OpenAI())
response = client.chat.completions.create(
model="gpt-4o",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Explain prompt caching."},
],
)
```
**What CacheGuardian does automatically:**
| Optimization | What it does |
|---|---|
| Derives `prompt_cache_key` | Generates a stable routing key so your requests hit the same physical cache hardware |
| Reorders content | Moves system messages before user messages for better prefix overlap |
| Sorts tools | Same as Anthropic — deterministic ordering |
| Smart retention | Sets `prompt_cache_retention="24h"` when your request intervals are > 10 min |
| 1024-token threshold | Suppresses false-positive cache warnings for prompts under 1024 tokens |
### Google Gemini
```python
import cacheguardian
from google import genai
client = cacheguardian.wrap(genai.Client())
response = client.models.generate_content(
model="gemini-2.5-flash",
contents="Summarize this document.",
config={"system_instruction": "You are an expert analyst."},
)
```
**What CacheGuardian does automatically:**
| Optimization | What it does |
|---|---|
| Implicit → Explicit promotion | Creates a `CachedContent` object when the cost-benefit math says it saves money |
| TTL optimization | Calculates optimal TTL from your request frequency to minimize storage costs |
| Zombie cache cleanup | Persists a cache registry to disk — cleans up orphaned caches even after crashes |
| Storage cost tracking | Tracks Gemini's per-hour storage fees separately so you see real ROI |
### Async Clients
CacheGuardian supports async clients out of the box. All diffing and metric extraction runs via `asyncio.to_thread()` so the event loop is never blocked.
```python
import cacheguardian
import anthropic
client = cacheguardian.wrap(anthropic.AsyncAnthropic())
# Use await as normal
response = await client.messages.create(
model="claude-sonnet-4-20250514",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello"}],
)
```
Works with `AsyncAnthropic`, `AsyncOpenAI`, and Gemini's async methods.
---
## How It Works
CacheGuardian uses a **tiered L1 / L2 / L3 architecture** inspired by CPU cache hierarchies and production inference gateways:
```
┌───────────────────────────────────────────────────────────────┐
│ Your Application │
├───────────────────────────────────────────────────────────────┤
│ cacheguardian.wrap() │
├──────────┬────────────────────────────────────┬───────────────┤
│ │ │ │
│ L1 │ Local Python Dict │ < 1 ms │
│ │ Rolling segment fingerprints │ │
│ │ Instant divergence detection │ │
│ │ │ │
├──────────┼────────────────────────────────────┼───────────────┤
│ │ │ │
│ L2 │ Redis (optional) │ 2 – 10 ms │
│ │ Cross-worker prefix sharing │ │
│ │ Gemini CachedContent coordination │ │
│ │ │ │
├──────────┼────────────────────────────────────┼───────────────┤
│ │ │ │
│ L3 │ Provider API │ 100 ms – 2s │
│ │ The actual transformer KV-cache │ │
│ │ │ │
└──────────┴────────────────────────────────────┴───────────────┘
```
### L1: The Secret Sauce
Instead of hashing your entire prompt, CacheGuardian hashes it in **segments**:
```
system prompt → sha256 → "a3f1..."
tools block → sha256 → "b7e2..."
message[0] → sha256 → "c9d4..."
message[1] → sha256 → "e1a6..."
```
When your next request comes in, it compares segment hashes sequentially. The moment one doesn't match, it knows exactly **which segment diverged** — without scanning the full content. This is how it achieves < 1ms detection even on 100k-token prompts.
### What L1 Enables
- **Pre-emptive warnings** — Detect a 1-character typo in a 50,000-token system prompt *before* the request is sent and the bill is generated
- **`dry_run` mode** — Test your prompt structure against the cache without spending a cent
- **Actionable suggestions** — Not just "cache missed" but "your system prompt changed — use a system-reminder message instead"
---
## Dry Run Mode
Test whether your prompt would hit the cache — without making an API call.
```python
import cacheguardian
client = cacheguardian.wrap(anthropic.Anthropic())
# First, make a real call to establish the cache
client.messages.create(model="claude-sonnet-4-20250514", ...)
# Now test a new prompt against the cache for free
result = cacheguardian.dry_run(
client,
model="claude-sonnet-4-20250514",
system="You are a helpful assistant.",
messages=[{"role": "user", "content": "New question"}],
)
print(result.would_hit_cache) # True / False
print(result.prefix_match_depth) # "75% — 3/4 segments match (diverged at message[1])"
print(result.estimated_savings) # 0.034
print(result.warnings) # [CacheBreakWarning(...)]
```
```
[cacheguardian] DRY RUN — would HIT cache | Estimated savings: $0.0340
```
Zero cost. Instant feedback. Iterate on your prompt structure before spending a cent.
---
## Configuration
```python
client = cacheguardian.wrap(
anthropic.Anthropic(),
# Automatically fix safe issues (tool sorting, cache_control injection)
auto_fix=True, # default: True
# TTL strategy for Anthropic
ttl_strategy="auto", # "auto" | "5m" | "1h" — default: "auto"
# Strict mode: raise exceptions instead of warnings on cache breaks
strict_mode=False, # default: False
# Logging verbosity
log_level="INFO", # "DEBUG" | "INFO" | "WARNING" | "ERROR"
# Alert when cache hit rate drops below this threshold
min_cache_hit_rate=0.7, # default: 0.7
# OpenAI: custom function to derive prompt_cache_key
cache_key_fn=lambda session: f"user_{session.session_id}",
# L2: Redis URL for distributed environments
l2_backend="redis://localhost:6379",
# Privacy: add timing jitter to prevent cache-timing side-channel attacks
privacy_mode=False, # default: False
privacy_jitter_ms=(50, 200), # jitter range in ms — default: (50, 200)
)
```
### Pricing Overrides
CacheGuardian ships with default pricing tables for all supported models. If prices change, override them:
```python
from cacheguardian.config import PricingConfig
client = cacheguardian.wrap(
anthropic.Anthropic(),
pricing_overrides={
"anthropic": {
"claude-sonnet-4-20250514": PricingConfig(
base_input=3.00, # $ per million tokens
cache_read=0.30, # 90% discount
cache_write_5m=3.75, # 25% premium (5-min TTL)
cache_write_1h=6.00, # 100% premium (1-hour TTL)
output=15.00,
),
},
},
)
```
---
## The Promotion Formula
For Gemini (explicit `CachedContent`) and Anthropic (1-hour TTL), CacheGuardian uses a break-even formula to decide when upgrading is worth the cost:
```
N > (C_write + S × T) / (C_input − C_cache_read)
```
| Symbol | Meaning |
|---|---|
| **N** | Expected number of requests reusing this content |
| **C_write** | One-time cost to write the cache |
| **S** | Storage cost per hour (Gemini only; 0 for Anthropic) |
| **T** | TTL in hours |
| **C_input** | Standard input token cost |
| **C_cache_read** | Discounted cache read cost |
CacheGuardian tracks your request frequency automatically and promotes when **N** crosses the break-even threshold.
---
## System Prompt Templates
Dynamic content in system prompts (dates, user names, config values) is one of the most common cache killers. CacheGuardian provides a template pattern that keeps the cache-friendly static part as the system prompt and injects dynamic values as messages instead:
```python
from cacheguardian.core.optimizer import SystemPromptTemplate
template = SystemPromptTemplate(
"You are a helpful assistant. The current date is {date}. User: {user_name}."
)
# Use the static template as your system prompt (never changes → always cached)
system_prompt = template.static_part
# Inject dynamic values as a system-reminder message (appended, not prefixed)
reminder = template.render_dynamic(date="2026-02-20", user_name="Alice")
# → "Updated context: date=2026-02-20, user_name=Alice"
```
---
## Distributed Caching with Redis (L2)
In serverless or multi-worker environments, different workers may not know about each other's sessions. The optional L2 cache solves this:
```python
client = cacheguardian.wrap(
anthropic.Anthropic(),
l2_backend="redis://localhost:6379",
)
```
**What L2 enables:**
- **Cross-worker prefix sharing** — Worker B knows that Worker A already warmed the cache for a given prefix
- **Gemini cache coordination** — Prevents redundant `CachedContent` creation fees when multiple workers process the same content
- **Rate limit coordination** — Shared request counting across workers
- **Graceful degradation** — If Redis is unavailable, CacheGuardian falls back to L1-only with zero errors
---
## Gemini Safety Lock
Gemini's explicit caches incur storage fees of **$4.50 per million tokens per hour**. If your process crashes without cleaning up, those caches keep billing.
CacheGuardian solves this with a **disk-persisted cache registry**:
```python
from cacheguardian.providers.gemini import GeminiProvider
# On startup, clean up any zombie caches from previous crashes
provider = GeminiProvider(config, gemini_client=client)
cleaned = provider.cleanup_stale_caches(max_age_hours=2.0)
print(f"Cleaned {cleaned} orphaned caches")
```
The registry is written to `~/.cache/cacheguardian/gemini_registry.json` on every cache creation. On next startup, any caches not accessed within the threshold are automatically deleted.
---
## Architecture
```
cacheguardian/
├── __init__.py # Public API: wrap(), dry_run(), configure()
├── types.py # Core data types (9 dataclasses)
├── config.py # Configuration + pricing tables
│
├── cache/
│ ├── fingerprint.py # Normalize → segment → rolling SHA-256 hash
│ ├── l1.py # Local dict: <1ms fingerprint comparison
│ └── l2.py # Optional Redis: cross-worker coordination
│
├── core/
│ ├── session.py # Session state tracking across API calls
│ ├── optimizer.py # Transforms: sort tools, stabilize JSON, templates
│ ├── differ.py # Segment-level diff engine with cost estimation
│ ├── metrics.py # Cost formulas for all 3 providers
│ ├── promoter.py # Break-even promotion logic
│ └── logger.py # Rich colored terminal output
│
├── providers/
│ ├── base.py # Abstract provider interface
│ ├── anthropic.py # cache_control, breakpoints, TTL, JSON stabilization
│ ├── openai.py # prompt_cache_key, retention, content reordering
│ └── gemini.py # CachedContent lifecycle, promotion, safety lock
│
├── middleware/
│ ├── interceptor.py # Sync wrapper: L1 → transform → L3 → metrics
│ └── async_interceptor.py # Async wrapper: non-blocking via asyncio.to_thread()
│
└── persistence/
└── cache_registry.py # Disk-persisted Gemini cache safety lock
```
---
## Design Principles
1. **Exact prefix matching only.** No semantic or embedding-based caching. CacheGuardian guarantees 100% accuracy — it will never serve a "similar" cached result for a different question.
2. **Never modify the response.** CacheGuardian transforms the *request* (sorting tools, injecting cache_control) and *logs* after the response. The response object you receive is identical to what the raw SDK would return.
3. **Composition over inheritance.** SDK clients are wrapped, not subclassed. This makes CacheGuardian resilient to SDK version changes.
4. **Optional everything.** Install only the provider SDKs you use. Redis is optional. Privacy mode is optional. Every feature degrades gracefully when its dependency is absent.
---
## Contributing
Contributions are welcome! Here's how to set up the development environment:
```bash
git clone https://github.com/kclaka/cacheguardian.git
cd cacheguardian
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
# Run the test suite
pytest -v
```
**125 tests** cover all modules: fingerprinting, L1 cache, transforms, session tracking, cost calculations, promotion logic, and all three providers.
---
## License
MIT
---
<p align="center">
<strong>CacheGuardian</strong> — because the best API call is the one you don't pay full price for.
</p>
| text/markdown | null | Kenny Igbechi <hello@kennyigbechi.com> | null | null | null | llm, prompt-caching, anthropic, openai, gemini, cache, optimization, cost-savings, middleware | [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Typing :: Typed"
] | [] | null | null | >=3.10 | [] | [] | [] | [
"rich>=13.0",
"anthropic>=0.39.0; extra == \"anthropic\"",
"openai>=1.50.0; extra == \"openai\"",
"google-genai>=1.0.0; extra == \"gemini\"",
"redis>=5.0.0; extra == \"redis\"",
"anthropic>=0.39.0; extra == \"all\"",
"openai>=1.50.0; extra == \"all\"",
"google-genai>=1.0.0; extra == \"all\"",
"redis>=5.0.0; extra == \"all\"",
"pytest>=8.0; extra == \"dev\"",
"pytest-asyncio>=0.23.0; extra == \"dev\"",
"pytest-mock>=3.12.0; extra == \"dev\""
] | [] | [] | [] | [
"Homepage, https://github.com/kclaka/cacheguardian",
"Repository, https://github.com/kclaka/cacheguardian",
"Issues, https://github.com/kclaka/cacheguardian/issues"
] | twine/6.2.0 CPython/3.13.0 | 2026-02-20T18:58:11.063260 | cacheguardian-0.1.0.tar.gz | 47,352 | c0/9f/9cf7188168fdd829f21a0afda3cbe0ef12846c95bb75bae42450db3e96a8/cacheguardian-0.1.0.tar.gz | source | sdist | null | false | 8663ac078828914855210ba0e7d67431 | b089ac48686f057a257f0b9c5f0a245720e454170ff699c6a57c93e3cb5d4479 | c09f9cf7188168fdd829f21a0afda3cbe0ef12846c95bb75bae42450db3e96a8 | MIT | [
"LICENSE"
] | 202 |
2.4 | kiln3d-octoprint | 0.2.1 | Agent-friendly CLI for OctoPrint 3D printer management | # octoprint-cli
Agent-friendly command-line interface for [OctoPrint](https://octoprint.org/) 3D printer management.
Designed for autonomous AI agent interaction with structured JSON outputs, clear exit codes, and safety guards for unattended operation.
## Installation
```bash
pip install .
```
Or in development mode:
```bash
pip install -e ".[dev]"
```
## Quick Start
### 1. Initialize configuration
```bash
octoprint-cli init
# Prompts for host URL and API key, saves to ~/.octoprint-cli/config.yaml
```
### 2. Or use environment variables
```bash
export OCTOPRINT_HOST="http://octopi.local"
export OCTOPRINT_API_KEY="your_api_key_here"
```
### 3. Check printer status
```bash
octoprint-cli status --json
```
## Commands
| Command | Description |
|---------|-------------|
| `status` | Get printer state, temperatures, and job progress |
| `files` | List available G-code files on the printer |
| `upload <file>` | Upload a G-code file |
| `print <file>` | Upload and start printing (requires `--confirm`) |
| `cancel` | Cancel current print (requires `--confirm`) |
| `pause` | Pause current print |
| `resume` | Resume paused print |
| `preflight [file]` | Run pre-flight safety checks |
| `temp` | Get or set temperatures |
| `gcode <cmds>` | Send raw G-code commands |
| `connect` | Connect printer to OctoPrint |
| `disconnect` | Disconnect printer from OctoPrint |
| `init` | Create configuration file |
## Agent-Friendly Design
### Structured JSON Output
Every command supports `--json` for machine-parseable output:
```bash
octoprint-cli status --json
```
```json
{
"status": "success",
"data": {
"state": "Operational",
"temperature": {
"tool0": {"actual": 22.5, "target": 0.0},
"bed": {"actual": 21.8, "target": 0.0}
},
"job": {
"file": null,
"completion": null,
"print_time_left": null
}
}
}
```
### Exit Codes
| Code | Meaning |
|------|---------|
| `0` | Success |
| `1` | Printer offline / unreachable |
| `2` | File error (not found, invalid format) |
| `3` | Printer busy (already printing) |
| `4` | Other error (auth, server, validation) |
### Safety Flags
Destructive operations require explicit confirmation:
```bash
# Will fail without --confirm
octoprint-cli print model.gcode --confirm --json
# Cancel with confirmation
octoprint-cli cancel --confirm --json
```
### Idempotent Operations
```bash
# Exits 0 if already printing instead of erroring
octoprint-cli print model.gcode --confirm --skip-if-printing --json
```
## Configuration
Configuration is resolved with this precedence (highest first):
1. CLI flags (`--host`, `--api-key`)
2. Environment variables (`OCTOPRINT_HOST`, `OCTOPRINT_API_KEY`)
3. Config file (`~/.octoprint-cli/config.yaml`)
### Config File Format
```yaml
host: "http://octopi.local"
api_key: "YOUR_API_KEY_HERE"
timeout: 30
retries: 3
```
## Agent Workflow Example
A typical autonomous print workflow:
```bash
# Step 1: Verify printer is ready
octoprint-cli preflight ./model.gcode --json
# Parse JSON, check "ready": true
# Step 2: Upload and print
octoprint-cli print ./model.gcode --confirm --json
# Parse JSON, check "status": "success"
# Step 3: Monitor progress (poll periodically)
octoprint-cli status --json
# Parse JSON, read data.job.completion and data.job.print_time_left
# Step 4: Handle completion or errors based on exit codes
# Exit 0 = success, 1 = offline, 2 = file error, 3 = busy, 4 = other
```
### Error Handling Example
```bash
octoprint-cli status --json
echo "Exit code: $?"
```
```json
{
"status": "error",
"data": null,
"error": {
"code": "CONNECTION_ERROR",
"message": "Could not connect to OctoPrint at http://octopi.local"
}
}
```
Exit code: `1` (printer offline)
## Pre-flight Checks
The `preflight` command (and automatic checks before `print`) validates:
- Printer is connected and operational
- Printer is not already printing
- No printer errors detected
- Temperatures are within safe limits
- File exists, has valid extension, reasonable size
```bash
octoprint-cli preflight ./model.gcode --json
```
## Temperature Control
```bash
# View current temperatures
octoprint-cli temp --json
# Set hotend to 200C and bed to 60C
octoprint-cli temp --tool 200 --bed 60 --json
# Turn off all heaters
octoprint-cli temp --off --json
```
## Raw G-code
```bash
# Home all axes
octoprint-cli gcode G28 --json
# Multiple commands
octoprint-cli gcode G28 "M104 S200" "M140 S60" --json
```
## Requirements
- Python 3.8+
- OctoPrint server with API access enabled
- Dependencies: click, requests, pyyaml, rich
## License
MIT
| text/markdown | OctoPrint CLI Contributors | null | null | null | MIT | octoprint, 3d-printing, cli, automation, agent | [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Manufacturing",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Printing",
"Topic :: System :: Hardware"
] | [] | null | null | >=3.8 | [] | [] | [] | [
"click>=8.0",
"requests>=2.25",
"pyyaml>=5.4",
"rich>=12.0",
"pytest>=7.0; extra == \"dev\"",
"pytest-cov>=4.0; extra == \"dev\"",
"pytest-mock>=3.6; extra == \"dev\"",
"responses>=0.20; extra == \"dev\""
] | [] | [] | [] | [
"Homepage, https://github.com/codeofaxel/Kiln",
"Issues, https://github.com/codeofaxel/Kiln/issues"
] | twine/6.1.0 CPython/3.13.7 | 2026-02-20T18:58:09.095146 | kiln3d_octoprint-0.2.1.tar.gz | 32,202 | 9b/a0/4e94a2c0c14e7c8f28fa6446f4c2f84f2c03a1070494f4933d153f54424a/kiln3d_octoprint-0.2.1.tar.gz | source | sdist | null | false | bf5bd2192bec48f60f37c24e08b702c8 | 18f7aab1b50d161dd687f2e3747b28d3f768041ad42c6b4385b151903e20b4af | 9ba04e94a2c0c14e7c8f28fa6446f4c2f84f2c03a1070494f4933d153f54424a | null | [] | 162 |
2.4 | sbase | 4.47.0 | A complete web automation framework for end-to-end testing. | **[<img src="https://img.shields.io/badge/pypi-sbase-22AAEE.svg" alt="pypi" />](https://pypi.python.org/pypi/sbase) is a proxy for [<img src="https://img.shields.io/badge/pypi-seleniumbase-22AAEE.svg" alt="pypi" />](https://pypi.python.org/pypi/seleniumbase)**
****
<!-- SeleniumBase Docs -->
<meta property="og:site_name" content="SeleniumBase">
<meta property="og:title" content="SeleniumBase: Python Web Automation and E2E Testing" />
<meta property="og:description" content="Fast, easy, and reliable Web/UI testing with Python." />
<meta property="og:keywords" content="Python, pytest, selenium, webdriver, testing, automation, seleniumbase, framework, dashboard, recorder, reports, screenshots">
<meta property="og:image" content="https://seleniumbase.github.io/cdn/img/mac_sb_logo_5b.png" />
<link rel="icon" href="https://seleniumbase.github.io/img/logo7.png" />
<h1>SeleniumBase</h1>
<p align="center"><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.github.io/cdn/img/super_logo_sb3.png" alt="SeleniumBase" title="SeleniumBase" width="350" /></a></p>
<p align="center" class="hero__title"><b>All-in-one Browser Automation Framework:<br />Web Crawling / Testing / Scraping / Stealth</b></p>
<p align="center"><a href="https://pypi.python.org/pypi/seleniumbase" target="_blank"><img src="https://img.shields.io/pypi/v/seleniumbase.svg?color=3399EE" alt="PyPI version" /></a> <a href="https://github.com/seleniumbase/SeleniumBase/releases" target="_blank"><img src="https://img.shields.io/github/v/release/seleniumbase/SeleniumBase.svg?color=22AAEE" alt="GitHub version" /></a> <a href="https://seleniumbase.io"><img src="https://img.shields.io/badge/docs-seleniumbase.io-11BBAA.svg" alt="SeleniumBase Docs" /></a> <a href="https://github.com/seleniumbase/SeleniumBase/actions" target="_blank"><img src="https://github.com/seleniumbase/SeleniumBase/workflows/CI%20build/badge.svg" alt="SeleniumBase GitHub Actions" /></a> <a href="https://discord.gg/EdhQTn3EyE" target="_blank"><img src="https://img.shields.io/badge/join-discord-infomational" alt="Join the SeleniumBase chat on Discord"/></a></p>
<p align="center">
<a href="#python_installation">🚀 Start</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/features_list.md">🏰 Features</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/customizing_test_runs.md">🎛️ Options</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/ReadMe.md">📚 Examples</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/console_scripts/ReadMe.md">🌠 Scripts</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/mobile_testing.md">📱 Mobile</a>
<br />
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/method_summary.md">📘 APIs</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md"> 🔠 Formats</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/recorder_mode.md">🔴 Recorder</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/example_logs/ReadMe.md">📊 Dashboard</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/locale_codes.md">🗾 Locales</a> |
<a href="https://seleniumbase.io/devices/?url=seleniumbase.com">💻 Farm</a>
<br />
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/commander.md">🎖️ GUI</a> |
<a href="https://seleniumbase.io/demo_page">📰 TestPage</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/uc_mode.md">👤 UC Mode</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/ReadMe.md">🐙 CDP Mode</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/chart_maker/ReadMe.md">📶 Charts</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/utilities/selenium_grid/ReadMe.md">🌐 Grid</a>
<br />
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/how_it_works.md">👁️ How</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/tree/master/examples/migration/raw_selenium">🚝 Migrate</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/case_plans.md">🗂️ CasePlans</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/tree/master/examples/boilerplates">♻️ Template</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/master_qa/ReadMe.md">🧬 Hybrid</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/tour_examples/ReadMe.md">🚎 Tours</a>
<br />
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/github/workflows/ReadMe.md">🤖 CI/CD</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/js_package_manager.md">🕹️ JSMgr</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/translations.md">🌏 Translator</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/presenter/ReadMe.md">🎞️ Presenter</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/dialog_boxes/ReadMe.md">🛂 Dialog</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/visual_testing/ReadMe.md">🖼️ Visual</a>
<br />
</p>
<p>SeleniumBase is the professional toolkit for web automation activities. Built for testing websites, bypassing CAPTCHAs, enhancing productivity, completing tasks, and scaling your business.</p>
--------
📚 Learn from [**over 200 examples** in the **SeleniumBase/examples/** folder](https://github.com/seleniumbase/SeleniumBase/tree/master/examples).
🐙 Note that <a translate="no" href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/uc_mode.md"><b>UC Mode</b></a> / <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/ReadMe.md"><b>CDP Mode</b></a> (Stealth Mode) have their own ReadMe files.
ℹ️ Most scripts run with raw <code translate="no"><b>python</b></code>, although some scripts use <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md">Syntax Formats</a> that expect <a href="https://docs.pytest.org/en/latest/how-to/usage.html" translate="no"><b>pytest</b></a> (a Python unit-testing framework included with SeleniumBase that can discover, collect, and run tests automatically).
--------
<p align="left">📗 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_google.py">raw_google.py</a>, which performs a Google search:</p>
```python
from seleniumbase import SB
with SB(test=True, uc=True) as sb:
sb.open("https://google.com/ncr")
sb.type('[title="Search"]', "SeleniumBase GitHub page\n")
sb.click('[href*="github.com/seleniumbase/"]')
sb.save_screenshot_to_logs() # ./latest_logs/
print(sb.get_page_title())
```
> `python raw_google.py`
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_google.py"><img src="https://seleniumbase.github.io/cdn/gif/google_search.gif" alt="SeleniumBase Test" title="SeleniumBase Test" width="420" /></a>
--------
<p align="left">📗 Here's an example of bypassing Cloudflare's challenge page: <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/raw_gitlab.py">SeleniumBase/examples/cdp_mode/raw_gitlab.py</a></p>
```python
from seleniumbase import SB
with SB(uc=True, test=True, locale="en") as sb:
url = "https://gitlab.com/users/sign_in"
sb.activate_cdp_mode(url)
sb.uc_gui_click_captcha()
sb.sleep(2)
```
<img src="https://seleniumbase.github.io/other/cf_sec.jpg" title="SeleniumBase" width="332"> <img src="https://seleniumbase.github.io/other/gitlab_bypass.png" title="SeleniumBase" width="288">
--------
<p align="left">📗 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_get_swag.py">test_get_swag.py</a>, which tests an e-commerce site:</p>
```python
from seleniumbase import BaseCase
BaseCase.main(__name__, __file__) # Call pytest
class MyTestClass(BaseCase):
def test_swag_labs(self):
self.open("https://www.saucedemo.com")
self.type("#user-name", "standard_user")
self.type("#password", "secret_sauce\n")
self.assert_element("div.inventory_list")
self.click('button[name*="backpack"]')
self.click("#shopping_cart_container a")
self.assert_text("Backpack", "div.cart_item")
self.click("button#checkout")
self.type("input#first-name", "SeleniumBase")
self.type("input#last-name", "Automation")
self.type("input#postal-code", "77123")
self.click("input#continue")
self.click("button#finish")
self.assert_text("Thank you for your order!")
```
> `pytest test_get_swag.py`
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_get_swag.py"><img src="https://seleniumbase.github.io/cdn/gif/fast_swag_2.gif" alt="SeleniumBase Test" title="SeleniumBase Test" width="480" /></a>
> (The default browser is ``--chrome`` if not set.)
--------
<p align="left">📗 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_coffee_cart.py" target="_blank">test_coffee_cart.py</a>, which verifies an e-commerce site:</p>
```bash
pytest test_coffee_cart.py --demo
```
<p align="left"><a href="https://seleniumbase.io/coffee/" target="_blank"><img src="https://seleniumbase.github.io/cdn/gif/coffee_cart.gif" width="480" alt="SeleniumBase Coffee Cart Test" title="SeleniumBase Coffee Cart Test" /></a></p>
> <p>(<code translate="no">--demo</code> mode slows down tests and highlights actions)</p>
--------
<a id="multiple_examples"></a>
<p align="left">📗 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_demo_site.py" target="_blank">test_demo_site.py</a>, which covers several actions:</p>
```bash
pytest test_demo_site.py
```
<p align="left"><a href="https://seleniumbase.io/demo_page" target="_blank"><img src="https://seleniumbase.github.io/cdn/gif/demo_page_5.gif" width="480" alt="SeleniumBase Example" title="SeleniumBase Example" /></a></p>
> Easy to type, click, select, toggle, drag & drop, and more.
(For more examples, see the <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/ReadMe.md">SeleniumBase/examples/</a> folder.)
--------
<p align="left"><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.github.io/cdn/img/super_logo_sb3.png" alt="SeleniumBase" title="SeleniumBase" width="232" /></a></p>
<blockquote>
<p dir="auto"><strong>Explore the README:</strong></p>
<ul dir="auto">
<li><a href="#install_seleniumbase" ><strong>Get Started / Installation</strong></a></li>
<li><a href="#basic_example_and_usage"><strong>Basic Example / Usage</strong></a></li>
<li><a href="#common_methods" ><strong>Common Test Methods</strong></a></li>
<li><a href="#fun_facts" ><strong>Fun Facts / Learn More</strong></a></li>
<li><a href="#demo_mode_and_debugging"><strong>Demo Mode / Debugging</strong></a></li>
<li><a href="#command_line_options" ><strong>Command-line Options</strong></a></li>
<li><a href="#directory_configuration"><strong>Directory Configuration</strong></a></li>
<li><a href="#seleniumbase_dashboard" ><strong>SeleniumBase Dashboard</strong></a></li>
<li><a href="#creating_visual_reports"><strong>Generating Test Reports</strong></a></li>
</ul>
</blockquote>
--------
<details>
<summary> ▶️ How is <b>SeleniumBase</b> different from raw Selenium? (<b>click to expand</b>)</summary>
<div>
<p>💡 SeleniumBase is a Python framework for browser automation and testing. SeleniumBase uses <a href="https://www.w3.org/TR/webdriver2/#endpoints" target="_blank">Selenium/WebDriver</a> APIs and incorporates test-runners such as <code translate="no">pytest</code>, <code translate="no">pynose</code>, and <code translate="no">behave</code> to provide organized structure, test discovery, test execution, test state (<i>eg. passed, failed, or skipped</i>), and command-line options for changing default settings (<i>eg. browser selection</i>). With raw Selenium, you would need to set up your own options-parser for configuring tests from the command-line.</p>
<p>💡 SeleniumBase's driver manager gives you more control over automatic driver downloads. (Use <code translate="no">--driver-version=VER</code> with your <code translate="no">pytest</code> run command to specify the version.) By default, SeleniumBase will download a driver version that matches your major browser version if not set.</p>
<p>💡 SeleniumBase automatically detects between CSS Selectors and XPath, which means you don't need to specify the type of selector in your commands (<i>but optionally you could</i>).</p>
<p>💡 SeleniumBase methods often perform multiple actions in a single method call. For example, <code translate="no">self.type(selector, text)</code> does the following:<br />1. Waits for the element to be visible.<br />2. Waits for the element to be interactive.<br />3. Clears the text field.<br />4. Types in the new text.<br />5. Presses Enter/Submit if the text ends in <code translate="no">"\n"</code>.<br />With raw Selenium, those actions require multiple method calls.</p>
<p>💡 SeleniumBase uses default timeout values when not set:<br />
✅ <code translate="no">self.click("button")</code><br />
With raw Selenium, methods would fail instantly (<i>by default</i>) if an element needed more time to load:<br />
❌ <code translate="no">self.driver.find_element(by="css selector", value="button").click()</code><br />
(Reliable code is better than unreliable code.)</p>
<p>💡 SeleniumBase lets you change the explicit timeout values of methods:<br />
✅ <code translate="no">self.click("button", timeout=10)</code><br />
With raw Selenium, that requires more code:<br />
❌ <code translate="no">WebDriverWait(driver, 10).until(EC.element_to_be_clickable("css selector", "button")).click()</code><br />
(Simple code is better than complex code.)</p>
<p>💡 SeleniumBase gives you clean error output when a test fails. With raw Selenium, error messages can get very messy.</p>
<p>💡 SeleniumBase gives you the option to generate a dashboard and reports for tests. It also saves screenshots from failing tests to the <code translate="no">./latest_logs/</code> folder. Raw <a href="https://www.selenium.dev/documentation/webdriver/" translate="no" target="_blank">Selenium</a> does not have these options out-of-the-box.</p>
<p>💡 SeleniumBase includes desktop GUI apps for running tests, such as <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/commander.md" translate="no">SeleniumBase Commander</a> for <code translate="no">pytest</code> and <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/behave_bdd/ReadMe.md" translate="no">SeleniumBase Behave GUI</a> for <code translate="no">behave</code>.</p>
<p>💡 SeleniumBase has its own <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/recorder_mode.md">Recorder / Test Generator</a> for creating tests from manual browser actions.</p>
<p>💡 SeleniumBase comes with <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/case_plans.md">test case management software, ("CasePlans")</a>, for organizing tests and step descriptions.</p>
<p>💡 SeleniumBase includes tools for <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/chart_maker/ReadMe.md">building data apps, ("ChartMaker")</a>, which can generate JavaScript from Python.</p>
</div>
</details>
--------
<p>📚 <b>Learn about different ways of writing tests:</b></p>
<p align="left">📗📝 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_simple_login.py">test_simple_login.py</a>, which uses <code translate="no"><a href="https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/fixtures/base_case.py">BaseCase</a></code> class inheritance, and runs with <a href="https://docs.pytest.org/en/latest/how-to/usage.html">pytest</a> or <a href="https://github.com/mdmintz/pynose">pynose</a>. (Use <code translate="no">self.driver</code> to access Selenium's raw <code translate="no">driver</code>.)</p>
```python
from seleniumbase import BaseCase
BaseCase.main(__name__, __file__)
class TestSimpleLogin(BaseCase):
def test_simple_login(self):
self.open("seleniumbase.io/simple/login")
self.type("#username", "demo_user")
self.type("#password", "secret_pass")
self.click('a:contains("Sign in")')
self.assert_exact_text("Welcome!", "h1")
self.assert_element("img#image1")
self.highlight("#image1")
self.click_link("Sign out")
self.assert_text("signed out", "#top_message")
```
<p align="left">📘📝 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_login_sb.py">raw_login_sb.py</a>, which uses the <b><code translate="no">SB</code></b> Context Manager. Runs with pure <code translate="no">python</code>. (Use <code translate="no">sb.driver</code> to access Selenium's raw <code translate="no">driver</code>.)</p>
```python
from seleniumbase import SB
with SB() as sb:
sb.open("seleniumbase.io/simple/login")
sb.type("#username", "demo_user")
sb.type("#password", "secret_pass")
sb.click('a:contains("Sign in")')
sb.assert_exact_text("Welcome!", "h1")
sb.assert_element("img#image1")
sb.highlight("#image1")
sb.click_link("Sign out")
sb.assert_text("signed out", "#top_message")
```
<p align="left">📙📝 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_login_driver.py">raw_login_driver.py</a>, which uses the <b><code translate="no">Driver</code></b> Manager. Runs with pure <code translate="no">python</code>. (The <code>driver</code> is an improved version of Selenium's raw <code translate="no">driver</code>, with more methods.)</p>
```python
from seleniumbase import Driver
driver = Driver()
try:
driver.open("seleniumbase.io/simple/login")
driver.type("#username", "demo_user")
driver.type("#password", "secret_pass")
driver.click('a:contains("Sign in")')
driver.assert_exact_text("Welcome!", "h1")
driver.assert_element("img#image1")
driver.highlight("#image1")
driver.click_link("Sign out")
driver.assert_text("signed out", "#top_message")
finally:
driver.quit()
```
--------
<a id="python_installation"></a>
<h2><img src="https://seleniumbase.github.io/cdn/img/python_logo.png" title="SeleniumBase" width="42" /> Set up Python & Git:</h2>
<a href="https://www.python.org/downloads/"><img src="https://img.shields.io/pypi/pyversions/seleniumbase.svg?color=FACE42" title="Supported Python Versions" /></a>
🔵 Add <b><a href="https://www.python.org/downloads/">Python</a></b> and <b><a href="https://git-scm.com/">Git</a></b> to your System PATH.
🔵 Using a <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/virtualenv_instructions.md">Python virtual env</a> is recommended.
<a id="install_seleniumbase"></a>
<h2><img src="https://seleniumbase.github.io/img/logo7.png" title="SeleniumBase" width="32" /> Install SeleniumBase:</h2>
**You can install ``seleniumbase`` from [PyPI](https://pypi.org/project/seleniumbase/) or [GitHub](https://github.com/seleniumbase/SeleniumBase):**
🔵 **How to install ``seleniumbase`` from PyPI:**
```bash
pip install seleniumbase
```
* (Add ``--upgrade`` OR ``-U`` to upgrade SeleniumBase.)
* (Add ``--force-reinstall`` to upgrade indirect packages.)
* (Use ``pip3`` if multiple versions of Python are present.)
🔵 **How to install ``seleniumbase`` from a GitHub clone:**
```bash
git clone https://github.com/seleniumbase/SeleniumBase.git
cd SeleniumBase/
pip install -e .
```
🔵 **How to upgrade an existing install from a GitHub clone:**
```bash
git pull
pip install -e .
```
🔵 **Type ``seleniumbase`` or ``sbase`` to verify that SeleniumBase was installed successfully:**
```bash
___ _ _ ___
/ __| ___| |___ _ _ (_)_ _ _ __ | _ ) __ _ ______
\__ \/ -_) / -_) ' \| | \| | ' \ | _ \/ _` (_-< -_)
|___/\___|_\___|_||_|_|\_,_|_|_|_\|___/\__,_/__|___|
----------------------------------------------------
╭──────────────────────────────────────────────────╮
│ * USAGE: "seleniumbase [COMMAND] [PARAMETERS]" │
│ * OR: "sbase [COMMAND] [PARAMETERS]" │
│ │
│ COMMANDS: PARAMETERS / DESCRIPTIONS: │
│ get / install [DRIVER_NAME] [OPTIONS] │
│ methods (List common Python methods) │
│ options (List common pytest options) │
│ behave-options (List common behave options) │
│ gui / commander [OPTIONAL PATH or TEST FILE] │
│ behave-gui (SBase Commander for Behave) │
│ caseplans [OPTIONAL PATH or TEST FILE] │
│ mkdir [DIRECTORY] [OPTIONS] │
│ mkfile [FILE.py] [OPTIONS] │
│ mkrec / codegen [FILE.py] [OPTIONS] │
│ recorder (Open Recorder Desktop App.) │
│ record (If args: mkrec. Else: App.) │
│ mkpres [FILE.py] [LANG] │
│ mkchart [FILE.py] [LANG] │
│ print [FILE] [OPTIONS] │
│ translate [SB_FILE.py] [LANG] [ACTION] │
│ convert [WEBDRIVER_UNITTEST_FILE.py] │
│ extract-objects [SB_FILE.py] │
│ inject-objects [SB_FILE.py] [OPTIONS] │
│ objectify [SB_FILE.py] [OPTIONS] │
│ revert-objects [SB_FILE.py] [OPTIONS] │
│ encrypt / obfuscate │
│ decrypt / unobfuscate │
│ proxy (Start a basic proxy server) │
│ download server (Get Selenium Grid JAR file) │
│ grid-hub [start|stop] [OPTIONS] │
│ grid-node [start|stop] --hub=[HOST/IP] │
│ │
│ * EXAMPLE => "sbase get chromedriver stable" │
│ * For command info => "sbase help [COMMAND]" │
│ * For info on all commands => "sbase --help" │
╰──────────────────────────────────────────────────╯
```
<h3>🔵 Downloading webdrivers:</h3>
✅ SeleniumBase automatically downloads webdrivers as needed, such as ``chromedriver``.
<div></div>
<details>
<summary> ▶️ Here's sample output from a chromedriver download. (<b>click to expand</b>)</summary>
```bash
*** chromedriver to download = 131.0.6778.108 (Latest Stable)
Downloading chromedriver-mac-arm64.zip from:
https://storage.googleapis.com/chrome-for-testing-public/131.0.6778.108/mac-arm64/chromedriver-mac-arm64.zip ...
Download Complete!
Extracting ['chromedriver'] from chromedriver-mac-arm64.zip ...
Unzip Complete!
The file [chromedriver] was saved to:
~/github/SeleniumBase/seleniumbase/drivers/
chromedriver
Making [chromedriver 131.0.6778.108] executable ...
[chromedriver 131.0.6778.108] is now ready for use!
```
</details>
<a id="basic_example_and_usage"></a>
<h2><img src="https://seleniumbase.github.io/img/logo7.png" title="SeleniumBase" width="32" /> Basic Example / Usage:</h2>
🔵 If you've cloned SeleniumBase, you can run tests from the [examples/](https://github.com/seleniumbase/SeleniumBase/tree/master/examples) folder.
<p align="left">Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py">my_first_test.py</a>:</p>
```bash
cd examples/
pytest my_first_test.py
```
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py"><img src="https://seleniumbase.github.io/cdn/gif/fast_swag_2.gif" alt="SeleniumBase Test" title="SeleniumBase Test" width="480" /></a>
<p align="left"><b>Here's the full code for <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py">my_first_test.py</a>:</b></p>
```python
from seleniumbase import BaseCase
BaseCase.main(__name__, __file__)
class MyTestClass(BaseCase):
def test_swag_labs(self):
self.open("https://www.saucedemo.com")
self.type("#user-name", "standard_user")
self.type("#password", "secret_sauce\n")
self.assert_element("div.inventory_list")
self.assert_exact_text("Products", "span.title")
self.click('button[name*="backpack"]')
self.click("#shopping_cart_container a")
self.assert_exact_text("Your Cart", "span.title")
self.assert_text("Backpack", "div.cart_item")
self.click("button#checkout")
self.type("#first-name", "SeleniumBase")
self.type("#last-name", "Automation")
self.type("#postal-code", "77123")
self.click("input#continue")
self.assert_text("Checkout: Overview")
self.assert_text("Backpack", "div.cart_item")
self.assert_text("29.99", "div.inventory_item_price")
self.click("button#finish")
self.assert_exact_text("Thank you for your order!", "h2")
self.assert_element('img[alt="Pony Express"]')
self.js_click("a#logout_sidebar_link")
self.assert_element("div#login_button_container")
```
* By default, **[CSS Selectors](https://www.w3schools.com/cssref/css_selectors.asp)** are used for finding page elements.
* If you're new to CSS Selectors, games like [CSS Diner](http://flukeout.github.io/) can help you learn.
* For more reading, [here's an advanced guide on CSS attribute selectors](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors).
<a id="common_methods"></a>
<h3><img src="https://seleniumbase.github.io/img/logo7.png" title="SeleniumBase" width="32" /> Here are some common SeleniumBase methods:</h3>
```python
self.open(url) # Navigate the browser window to the URL.
self.type(selector, text) # Update the field with the text.
self.click(selector) # Click the element with the selector.
self.click_link(link_text) # Click the link containing text.
self.go_back() # Navigate back to the previous URL.
self.select_option_by_text(dropdown_selector, option)
self.hover_and_click(hover_selector, click_selector)
self.drag_and_drop(drag_selector, drop_selector)
self.get_text(selector) # Get the text from the element.
self.get_current_url() # Get the URL of the current page.
self.get_page_source() # Get the HTML of the current page.
self.get_attribute(selector, attribute) # Get element attribute.
self.get_title() # Get the title of the current page.
self.switch_to_frame(frame) # Switch into the iframe container.
self.switch_to_default_content() # Leave the iframe container.
self.open_new_window() # Open a new window in the same browser.
self.switch_to_window(window) # Switch to the browser window.
self.switch_to_default_window() # Switch to the original window.
self.get_new_driver(OPTIONS) # Open a new driver with OPTIONS.
self.switch_to_driver(driver) # Switch to the browser driver.
self.switch_to_default_driver() # Switch to the original driver.
self.wait_for_element(selector) # Wait until element is visible.
self.is_element_visible(selector) # Return element visibility.
self.is_text_visible(text, selector) # Return text visibility.
self.sleep(seconds) # Do nothing for the given amount of time.
self.save_screenshot(name) # Save a screenshot in .png format.
self.assert_element(selector) # Verify the element is visible.
self.assert_text(text, selector) # Verify text in the element.
self.assert_exact_text(text, selector) # Verify text is exact.
self.assert_title(title) # Verify the title of the web page.
self.assert_downloaded_file(file) # Verify file was downloaded.
self.assert_no_404_errors() # Verify there are no broken links.
self.assert_no_js_errors() # Verify there are no JS errors.
```
🔵 For the complete list of SeleniumBase methods, see: <b><a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/method_summary.md">Method Summary</a></b>
<a id="fun_facts"></a>
<h2><img src="https://seleniumbase.github.io/img/logo7.png" title="SeleniumBase" width="32" /> Fun Facts / Learn More:</h2>
<p>✅ SeleniumBase automatically handles common <a href="https://www.selenium.dev/documentation/webdriver/" target="_blank">WebDriver</a> actions such as launching web browsers before tests, saving screenshots during failures, and closing web browsers after tests.</p>
<p>✅ SeleniumBase lets you customize tests via <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/customizing_test_runs.md">command-line options</a>.</p>
<p>✅ SeleniumBase uses simple syntax for commands. Example:</p>
```python
self.type("input", "dogs\n") # (The "\n" presses ENTER)
```
Most SeleniumBase scripts can be run with <code translate="no">pytest</code>, <code translate="no">pynose</code>, or pure <code translate="no">python</code>. Not all test runners can run all test formats. For example, tests that use the ``sb`` pytest fixture can only be run with ``pytest``. (See <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md">Syntax Formats</a>) There's also a <a href="https://behave.readthedocs.io/en/stable/gherkin.html#features" target="_blank">Gherkin</a> test format that runs with <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/behave_bdd/ReadMe.md">behave</a>.
```bash
pytest coffee_cart_tests.py --rs
pytest test_sb_fixture.py --demo
pytest test_suite.py --rs --html=report.html --dashboard
pynose basic_test.py --mobile
pynose test_suite.py --headless --report --show-report
python raw_sb.py
python raw_test_scripts.py
behave realworld.feature
behave calculator.feature -D rs -D dashboard
```
<p>✅ <code translate="no">pytest</code> includes automatic test discovery. If you don't specify a specific file or folder to run, <code translate="no">pytest</code> will automatically search through all subdirectories for tests to run based on the following criteria:</p>
* Python files that start with ``test_`` or end with ``_test.py``.
* Python methods that start with ``test_``.
With a SeleniumBase [pytest.ini](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/pytest.ini) file present, you can modify default discovery settings. The Python class name can be anything because ``seleniumbase.BaseCase`` inherits ``unittest.TestCase`` to trigger autodiscovery.
<p>✅ You can do a pre-flight check to see which tests would get discovered by <code translate="no">pytest</code> before the actual run:</p>
```bash
pytest --co -q
```
<p>✅ You can be more specific when calling <code translate="no">pytest</code> or <code translate="no">pynose</code> on a file:</p>
```bash
pytest [FILE_NAME.py]::[CLASS_NAME]::[METHOD_NAME]
pynose [FILE_NAME.py]:[CLASS_NAME].[METHOD_NAME]
```
<p>✅ No More Flaky Tests! SeleniumBase methods automatically wait for page elements to finish loading before interacting with them (<i>up to a timeout limit</i>). This means <b>you no longer need random <span><code translate="no">time.sleep()</code></span> statements</b> in your scripts.</p>
<img src="https://img.shields.io/badge/Flaky%20Tests%3F-%20NO%21-11BBDD.svg" alt="NO MORE FLAKY TESTS!" />
✅ SeleniumBase supports all major browsers and operating systems:
<p><b>Browsers:</b> Chrome, Edge, Firefox, and Safari.</p>
<p><b>Systems:</b> Linux/Ubuntu, macOS, and Windows.</p>
✅ SeleniumBase works on all popular CI/CD platforms:
<p><a href="https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/github/workflows/ReadMe.md"><img alt="GitHub Actions integration" src="https://img.shields.io/badge/GitHub_Actions-12B2C2.svg?logo=GitHubActions&logoColor=CFFFC2" /></a> <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/azure/jenkins/ReadMe.md"><img alt="Jenkins integration" src="https://img.shields.io/badge/Jenkins-32B242.svg?logo=jenkins&logoColor=white" /></a> <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/azure/azure_pipelines/ReadMe.md"><img alt="Azure integration" src="https://img.shields.io/badge/Azure-2288EE.svg?logo=AzurePipelines&logoColor=white" /></a> <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/google_cloud/ReadMe.md"><img alt="Google Cloud integration" src="https://img.shields.io/badge/Google_Cloud-11CAE8.svg?logo=GoogleCloud&logoColor=EE0066" /></a> <a href="#utilizing_advanced_features"><img alt="AWS integration" src="https://img.shields.io/badge/AWS-4488DD.svg?logo=AmazonAWS&logoColor=FFFF44" /></a> <a href="https://en.wikipedia.org/wiki/Personal_computer" target="_blank"><img alt="Your Computer" src="https://img.shields.io/badge/💻_Your_Computer-44E6E6.svg" /></a></p>
<p>✅ SeleniumBase includes an automated/manual hybrid solution called <b><a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/master_qa/ReadMe.md">MasterQA</a></b> to speed up manual testing with automation while manual testers handle validation.</p>
<p>✅ SeleniumBase supports <a href="https://github.com/seleniumbase/SeleniumBase/tree/master/examples/offline_examples">running tests while offline</a> (<i>assuming webdrivers have previously been downloaded when online</i>).</p>
<p>✅ For a full list of SeleniumBase features, <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/features_list.md">Click Here</a>.</p>
<a id="demo_mode_and_debugging"></a>
<h2><img src="https://seleniumbase.github.io/img/logo7.png" title="SeleniumBase" width="32" /> Demo Mode / Debugging:</h2>
🔵 <b>Demo Mode</b> helps you see what a test is doing. If a test is moving too fast for your eyes, run it in <b>Demo Mode</b> to pause the browser briefly between actions, highlight page elements being acted on, and display assertions:
```bash
pytest my_first_test.py --demo
```
🔵 ``time.sleep(seconds)`` can be used to make a test wait at a specific spot:
```python
import time; time.sleep(3) # Do nothing for 3 seconds.
```
🔵 **Debug Mode** with Python's built-in **[pdb](https://docs.python.org/3/library/pdb.html)** library helps you debug tests:
```python
import pdb; pdb.set_trace()
import pytest; pytest.set_trace()
breakpoint() # Shortcut for "import pdb; pdb.set_trace()"
```
> (**``pdb``** commands: ``n``, ``c``, ``s``, ``u``, ``d`` => ``next``, ``continue``, ``step``, ``up``, ``down``)
🔵 To pause an active test that throws an exception or error, (*and keep the browser window open while **Debug Mode** begins in the console*), add **``--pdb``** as a ``pytest`` option:
```bash
pytest test_fail.py --pdb
```
🔵 To start tests in Debug Mode, add **``--trace``** as a ``pytest`` option:
```bash
pytest test_coffee_cart.py --trace
```
<a href="https://github.com/mdmintz/pdbp"><img src="https://seleniumbase.github.io/cdn/gif/coffee_pdbp.gif" alt="SeleniumBase test with the pdbp (Pdb+) debugger" title="SeleniumBase test with the pdbp (Pdb+) debugger" /></a>
<a id="command_line_options"></a>
<h2>🔵 Command-line Options:</h2>
<a id="pytest_options"></a>
✅ Here are some useful command-line options that come with <code translate="no">pytest</code>:
```bash
-v # Verbose mode. Prints the full name of each test and shows more details.
-q # Quiet mode. Print fewer details in the console output when running tests.
-x # Stop running the tests after the first failure is reached.
--html=report.html # Creates a detailed pytest-html report after tests finish.
--co | --collect-only # Show what tests would get run. (Without running them)
--co -q # (Both options together!) - Do a dry run with full test names shown.
-n=NUM # Multithread the tests using that many threads. (Speed up test runs!)
-s # See print statements. (Should be on by default with pytest.ini present.)
--junit-xml=report.xml # Creates a junit-xml report after tests finish.
--pdb # If a test fails, enter Post Mortem Debug Mode. (Don't use with CI!)
--trace # Enter Debug Mode at the beginning of each test. (Don't use with CI!)
-m=MARKER # Run tests with the specified pytest marker.
```
<a id="new_pytest_options"></a>
✅ SeleniumBase provides additional <code translate="no">pytest</code> command-line options for tests:
```bash
--browser=BROWSER # (The web browser to use. Default: "chrome".)
--chrome # (Shortcut for "--browser=chrome". On by default.)
--edge # (Shortcut for "--browser=edge".)
--firefox # (Shortcut for "--browser=firefox".)
--safari # (Shortcut for "--browser=safari".)
--settings-file=FILE # (Override default SeleniumBase settings.)
--env=ENV # (Set the test env. Access with "self.env" in tests.)
--account=STR # (Set account. Access with "self.account" in tests.)
--data=STRING # (Extra test data. Access with "self.data" in tests.)
--var1=STRING # (Extra test data. Access with "self.var1" in tests.)
--var2=STRING # (Extra test data. Access with "self.var2" in tests.)
--var3=STRING # (Extra test data. Access with "self.var3" in tests.)
--variables=DICT # (Extra test data. Access with "self.variables".)
--user-data-dir=DIR # (Set the Chrome user data directory to use.)
--protocol=PROTOCOL # (The Selenium Grid protocol: http|https.)
--server=SERVER # (The Selenium Grid server/IP used for tests.)
--port=PORT # (The Selenium Grid port used by the test server.)
--cap-file=FILE # (The web browser's desired capabilities to use.)
--cap-string=STRING # (The web browser's desired capabilities to use.)
--proxy=SERVER:PORT # (Connect to a proxy server:port as tests are running)
--proxy=USERNAME:PASSWORD@SERVER:PORT # (Use an authenticated proxy server)
--proxy-bypass-list=STRING # (";"-separated hosts to bypass, Eg "*.foo.com")
--proxy-pac-url=URL # (Connect to a proxy server using a PAC_URL.pac file.)
--proxy-pac-url=USERNAME:PASSWORD@URL # (Authenticated proxy with PAC URL.)
--proxy-driver # (If a driver download is needed, will use: --proxy=PROXY.)
--multi-proxy # (Allow multiple authenticated proxies when multi-threaded.)
--agent=STRING # (Modify the web browser's User-Agent string.)
--mobile # (Use the mobile device emulator while running tests.)
--metrics=STRING # (Set mobile metrics: "CSSWidth,CSSHeight,PixelRatio".)
--chromium-arg="ARG=N,ARG2" # (Set Chromium args, ","-separated, no spaces.)
--firefox-arg="ARG=N,ARG2" # (Set Firefox args, comma-separated, no spaces.)
--firefox-pref=SET # (Set a Firefox preference:value set, comma-separated.)
--extension-zip=ZIP # (Load a Chrome Extension .zip|.crx, comma-separated.)
--extension-dir=DIR # (Load a Chrome Extension directory, comma-separated.)
--disable-features="F1,F2" # (Disable features, comma-separated, no spaces.)
--binary-location=PATH # (Set path of the Chromium browser binary to use.)
--driver-version=VER # (Set the chromedriver or uc_driver version to use.)
--sjw # (Skip JS Waits for readyState to be "complete" or Angular to load.)
--wfa # (Wait for AngularJS to be done loading after specific web actions.)
--pls=PLS # (Set pageLoadStrategy on Chrome: "normal", "eager", or "none".)
--headless # (The default headless mode. Linux uses this mode by default.)
--headless1 # (Use Chrome's old headless mode. Fast, but has limitations.)
--headless2 # (Use Chrome's new headless mo | text/markdown | Michael Mintz | mdmintz@gmail.com | Michael Mintz | null | MIT | null | [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Environment :: MacOS X",
"Environment :: Win32 (MS Windows)",
"Environment :: Web Environment",
"Framework :: Pytest",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Internet",
"Topic :: Scientific/Engineering",
"Topic :: Software Development",
"Topic :: Software Development :: Quality Assurance",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Testing",
"Topic :: Software Development :: Testing :: Acceptance",
"Topic :: Software Development :: Testing :: Traffic Generation",
"Topic :: Utilities"
] | [
"Windows"
] | https://github.com/seleniumbase/SeleniumBase | null | >=3.9 | [] | [] | [] | [
"seleniumbase>=4.47.0"
] | [] | [] | [] | [
"Homepage, https://github.com/seleniumbase/SeleniumBase",
"Changelog, https://github.com/seleniumbase/SeleniumBase/releases",
"Download, https://pypi.org/project/seleniumbase/#files",
"Blog, https://seleniumbase.com/",
"Discord, https://discord.gg/EdhQTn3EyE",
"PyPI, https://pypi.org/project/seleniumbase/",
"Source, https://github.com/seleniumbase/SeleniumBase",
"Repository, https://github.com/seleniumbase/SeleniumBase",
"Documentation, https://seleniumbase.io/"
] | twine/6.2.0 CPython/3.11.9 | 2026-02-20T18:58:05.691844 | sbase-4.47.0.tar.gz | 67,982 | a1/64/68dd8397ce44dadedb69d720835cdcbc8982866eb4254814c17cca532dc4/sbase-4.47.0.tar.gz | source | sdist | null | false | ae2fdd6e8eab1023b15e186f079684b7 | 4759265514e2922ba55c63b3d223b9ba76e6e2686b053560f614cad660e2cf89 | a16468dd8397ce44dadedb69d720835cdcbc8982866eb4254814c17cca532dc4 | null | [] | 171 |
2.4 | basecase | 4.47.0 | A complete web automation framework for end-to-end testing. | **[<img src="https://img.shields.io/badge/pypi-basecase-22AAEE.svg" alt="pypi" />](https://pypi.python.org/pypi/basecase) is a proxy for [<img src="https://img.shields.io/badge/pypi-seleniumbase-22AAEE.svg" alt="pypi" />](https://pypi.python.org/pypi/seleniumbase)**
****
<!-- SeleniumBase Docs -->
<meta property="og:site_name" content="SeleniumBase">
<meta property="og:title" content="SeleniumBase: Python Web Automation and E2E Testing" />
<meta property="og:description" content="Fast, easy, and reliable Web/UI testing with Python." />
<meta property="og:keywords" content="Python, pytest, selenium, webdriver, testing, automation, seleniumbase, framework, dashboard, recorder, reports, screenshots">
<meta property="og:image" content="https://seleniumbase.github.io/cdn/img/mac_sb_logo_5b.png" />
<link rel="icon" href="https://seleniumbase.github.io/img/logo7.png" />
<h1>SeleniumBase</h1>
<p align="center"><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.github.io/cdn/img/super_logo_sb3.png" alt="SeleniumBase" title="SeleniumBase" width="350" /></a></p>
<p align="center" class="hero__title"><b>All-in-one Browser Automation Framework:<br />Web Crawling / Testing / Scraping / Stealth</b></p>
<p align="center"><a href="https://pypi.python.org/pypi/seleniumbase" target="_blank"><img src="https://img.shields.io/pypi/v/seleniumbase.svg?color=3399EE" alt="PyPI version" /></a> <a href="https://github.com/seleniumbase/SeleniumBase/releases" target="_blank"><img src="https://img.shields.io/github/v/release/seleniumbase/SeleniumBase.svg?color=22AAEE" alt="GitHub version" /></a> <a href="https://seleniumbase.io"><img src="https://img.shields.io/badge/docs-seleniumbase.io-11BBAA.svg" alt="SeleniumBase Docs" /></a> <a href="https://github.com/seleniumbase/SeleniumBase/actions" target="_blank"><img src="https://github.com/seleniumbase/SeleniumBase/workflows/CI%20build/badge.svg" alt="SeleniumBase GitHub Actions" /></a> <a href="https://discord.gg/EdhQTn3EyE" target="_blank"><img src="https://img.shields.io/badge/join-discord-infomational" alt="Join the SeleniumBase chat on Discord"/></a></p>
<p align="center">
<a href="#python_installation">🚀 Start</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/features_list.md">🏰 Features</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/customizing_test_runs.md">🎛️ Options</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/ReadMe.md">📚 Examples</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/console_scripts/ReadMe.md">🌠 Scripts</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/mobile_testing.md">📱 Mobile</a>
<br />
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/method_summary.md">📘 APIs</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md"> 🔠 Formats</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/recorder_mode.md">🔴 Recorder</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/example_logs/ReadMe.md">📊 Dashboard</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/locale_codes.md">🗾 Locales</a> |
<a href="https://seleniumbase.io/devices/?url=seleniumbase.com">💻 Farm</a>
<br />
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/commander.md">🎖️ GUI</a> |
<a href="https://seleniumbase.io/demo_page">📰 TestPage</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/uc_mode.md">👤 UC Mode</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/ReadMe.md">🐙 CDP Mode</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/chart_maker/ReadMe.md">📶 Charts</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/utilities/selenium_grid/ReadMe.md">🌐 Grid</a>
<br />
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/how_it_works.md">👁️ How</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/tree/master/examples/migration/raw_selenium">🚝 Migrate</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/case_plans.md">🗂️ CasePlans</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/tree/master/examples/boilerplates">♻️ Template</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/master_qa/ReadMe.md">🧬 Hybrid</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/tour_examples/ReadMe.md">🚎 Tours</a>
<br />
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/github/workflows/ReadMe.md">🤖 CI/CD</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/js_package_manager.md">🕹️ JSMgr</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/translations.md">🌏 Translator</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/presenter/ReadMe.md">🎞️ Presenter</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/dialog_boxes/ReadMe.md">🛂 Dialog</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/visual_testing/ReadMe.md">🖼️ Visual</a>
<br />
</p>
<p>SeleniumBase is the professional toolkit for web automation activities. Built for testing websites, bypassing CAPTCHAs, enhancing productivity, completing tasks, and scaling your business.</p>
--------
📚 Learn from [**over 200 examples** in the **SeleniumBase/examples/** folder](https://github.com/seleniumbase/SeleniumBase/tree/master/examples).
🐙 Note that <a translate="no" href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/uc_mode.md"><b>UC Mode</b></a> / <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/ReadMe.md"><b>CDP Mode</b></a> (Stealth Mode) have their own ReadMe files.
ℹ️ Most scripts run with raw <code translate="no"><b>python</b></code>, although some scripts use <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md">Syntax Formats</a> that expect <a href="https://docs.pytest.org/en/latest/how-to/usage.html" translate="no"><b>pytest</b></a> (a Python unit-testing framework included with SeleniumBase that can discover, collect, and run tests automatically).
--------
<p align="left">📗 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_google.py">raw_google.py</a>, which performs a Google search:</p>
```python
from seleniumbase import SB
with SB(test=True, uc=True) as sb:
sb.open("https://google.com/ncr")
sb.type('[title="Search"]', "SeleniumBase GitHub page\n")
sb.click('[href*="github.com/seleniumbase/"]')
sb.save_screenshot_to_logs() # ./latest_logs/
print(sb.get_page_title())
```
> `python raw_google.py`
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_google.py"><img src="https://seleniumbase.github.io/cdn/gif/google_search.gif" alt="SeleniumBase Test" title="SeleniumBase Test" width="420" /></a>
--------
<p align="left">📗 Here's an example of bypassing Cloudflare's challenge page: <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/raw_gitlab.py">SeleniumBase/examples/cdp_mode/raw_gitlab.py</a></p>
```python
from seleniumbase import SB
with SB(uc=True, test=True, locale="en") as sb:
url = "https://gitlab.com/users/sign_in"
sb.activate_cdp_mode(url)
sb.uc_gui_click_captcha()
sb.sleep(2)
```
<img src="https://seleniumbase.github.io/other/cf_sec.jpg" title="SeleniumBase" width="332"> <img src="https://seleniumbase.github.io/other/gitlab_bypass.png" title="SeleniumBase" width="288">
--------
<p align="left">📗 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_get_swag.py">test_get_swag.py</a>, which tests an e-commerce site:</p>
```python
from seleniumbase import BaseCase
BaseCase.main(__name__, __file__) # Call pytest
class MyTestClass(BaseCase):
def test_swag_labs(self):
self.open("https://www.saucedemo.com")
self.type("#user-name", "standard_user")
self.type("#password", "secret_sauce\n")
self.assert_element("div.inventory_list")
self.click('button[name*="backpack"]')
self.click("#shopping_cart_container a")
self.assert_text("Backpack", "div.cart_item")
self.click("button#checkout")
self.type("input#first-name", "SeleniumBase")
self.type("input#last-name", "Automation")
self.type("input#postal-code", "77123")
self.click("input#continue")
self.click("button#finish")
self.assert_text("Thank you for your order!")
```
> `pytest test_get_swag.py`
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_get_swag.py"><img src="https://seleniumbase.github.io/cdn/gif/fast_swag_2.gif" alt="SeleniumBase Test" title="SeleniumBase Test" width="480" /></a>
> (The default browser is ``--chrome`` if not set.)
--------
<p align="left">📗 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_coffee_cart.py" target="_blank">test_coffee_cart.py</a>, which verifies an e-commerce site:</p>
```bash
pytest test_coffee_cart.py --demo
```
<p align="left"><a href="https://seleniumbase.io/coffee/" target="_blank"><img src="https://seleniumbase.github.io/cdn/gif/coffee_cart.gif" width="480" alt="SeleniumBase Coffee Cart Test" title="SeleniumBase Coffee Cart Test" /></a></p>
> <p>(<code translate="no">--demo</code> mode slows down tests and highlights actions)</p>
--------
<a id="multiple_examples"></a>
<p align="left">📗 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_demo_site.py" target="_blank">test_demo_site.py</a>, which covers several actions:</p>
```bash
pytest test_demo_site.py
```
<p align="left"><a href="https://seleniumbase.io/demo_page" target="_blank"><img src="https://seleniumbase.github.io/cdn/gif/demo_page_5.gif" width="480" alt="SeleniumBase Example" title="SeleniumBase Example" /></a></p>
> Easy to type, click, select, toggle, drag & drop, and more.
(For more examples, see the <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/ReadMe.md">SeleniumBase/examples/</a> folder.)
--------
<p align="left"><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.github.io/cdn/img/super_logo_sb3.png" alt="SeleniumBase" title="SeleniumBase" width="232" /></a></p>
<blockquote>
<p dir="auto"><strong>Explore the README:</strong></p>
<ul dir="auto">
<li><a href="#install_seleniumbase" ><strong>Get Started / Installation</strong></a></li>
<li><a href="#basic_example_and_usage"><strong>Basic Example / Usage</strong></a></li>
<li><a href="#common_methods" ><strong>Common Test Methods</strong></a></li>
<li><a href="#fun_facts" ><strong>Fun Facts / Learn More</strong></a></li>
<li><a href="#demo_mode_and_debugging"><strong>Demo Mode / Debugging</strong></a></li>
<li><a href="#command_line_options" ><strong>Command-line Options</strong></a></li>
<li><a href="#directory_configuration"><strong>Directory Configuration</strong></a></li>
<li><a href="#seleniumbase_dashboard" ><strong>SeleniumBase Dashboard</strong></a></li>
<li><a href="#creating_visual_reports"><strong>Generating Test Reports</strong></a></li>
</ul>
</blockquote>
--------
<details>
<summary> ▶️ How is <b>SeleniumBase</b> different from raw Selenium? (<b>click to expand</b>)</summary>
<div>
<p>💡 SeleniumBase is a Python framework for browser automation and testing. SeleniumBase uses <a href="https://www.w3.org/TR/webdriver2/#endpoints" target="_blank">Selenium/WebDriver</a> APIs and incorporates test-runners such as <code translate="no">pytest</code>, <code translate="no">pynose</code>, and <code translate="no">behave</code> to provide organized structure, test discovery, test execution, test state (<i>eg. passed, failed, or skipped</i>), and command-line options for changing default settings (<i>eg. browser selection</i>). With raw Selenium, you would need to set up your own options-parser for configuring tests from the command-line.</p>
<p>💡 SeleniumBase's driver manager gives you more control over automatic driver downloads. (Use <code translate="no">--driver-version=VER</code> with your <code translate="no">pytest</code> run command to specify the version.) By default, SeleniumBase will download a driver version that matches your major browser version if not set.</p>
<p>💡 SeleniumBase automatically detects between CSS Selectors and XPath, which means you don't need to specify the type of selector in your commands (<i>but optionally you could</i>).</p>
<p>💡 SeleniumBase methods often perform multiple actions in a single method call. For example, <code translate="no">self.type(selector, text)</code> does the following:<br />1. Waits for the element to be visible.<br />2. Waits for the element to be interactive.<br />3. Clears the text field.<br />4. Types in the new text.<br />5. Presses Enter/Submit if the text ends in <code translate="no">"\n"</code>.<br />With raw Selenium, those actions require multiple method calls.</p>
<p>💡 SeleniumBase uses default timeout values when not set:<br />
✅ <code translate="no">self.click("button")</code><br />
With raw Selenium, methods would fail instantly (<i>by default</i>) if an element needed more time to load:<br />
❌ <code translate="no">self.driver.find_element(by="css selector", value="button").click()</code><br />
(Reliable code is better than unreliable code.)</p>
<p>💡 SeleniumBase lets you change the explicit timeout values of methods:<br />
✅ <code translate="no">self.click("button", timeout=10)</code><br />
With raw Selenium, that requires more code:<br />
❌ <code translate="no">WebDriverWait(driver, 10).until(EC.element_to_be_clickable("css selector", "button")).click()</code><br />
(Simple code is better than complex code.)</p>
<p>💡 SeleniumBase gives you clean error output when a test fails. With raw Selenium, error messages can get very messy.</p>
<p>💡 SeleniumBase gives you the option to generate a dashboard and reports for tests. It also saves screenshots from failing tests to the <code translate="no">./latest_logs/</code> folder. Raw <a href="https://www.selenium.dev/documentation/webdriver/" translate="no" target="_blank">Selenium</a> does not have these options out-of-the-box.</p>
<p>💡 SeleniumBase includes desktop GUI apps for running tests, such as <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/commander.md" translate="no">SeleniumBase Commander</a> for <code translate="no">pytest</code> and <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/behave_bdd/ReadMe.md" translate="no">SeleniumBase Behave GUI</a> for <code translate="no">behave</code>.</p>
<p>💡 SeleniumBase has its own <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/recorder_mode.md">Recorder / Test Generator</a> for creating tests from manual browser actions.</p>
<p>💡 SeleniumBase comes with <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/case_plans.md">test case management software, ("CasePlans")</a>, for organizing tests and step descriptions.</p>
<p>💡 SeleniumBase includes tools for <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/chart_maker/ReadMe.md">building data apps, ("ChartMaker")</a>, which can generate JavaScript from Python.</p>
</div>
</details>
--------
<p>📚 <b>Learn about different ways of writing tests:</b></p>
<p align="left">📗📝 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_simple_login.py">test_simple_login.py</a>, which uses <code translate="no"><a href="https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/fixtures/base_case.py">BaseCase</a></code> class inheritance, and runs with <a href="https://docs.pytest.org/en/latest/how-to/usage.html">pytest</a> or <a href="https://github.com/mdmintz/pynose">pynose</a>. (Use <code translate="no">self.driver</code> to access Selenium's raw <code translate="no">driver</code>.)</p>
```python
from seleniumbase import BaseCase
BaseCase.main(__name__, __file__)
class TestSimpleLogin(BaseCase):
def test_simple_login(self):
self.open("seleniumbase.io/simple/login")
self.type("#username", "demo_user")
self.type("#password", "secret_pass")
self.click('a:contains("Sign in")')
self.assert_exact_text("Welcome!", "h1")
self.assert_element("img#image1")
self.highlight("#image1")
self.click_link("Sign out")
self.assert_text("signed out", "#top_message")
```
<p align="left">📘📝 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_login_sb.py">raw_login_sb.py</a>, which uses the <b><code translate="no">SB</code></b> Context Manager. Runs with pure <code translate="no">python</code>. (Use <code translate="no">sb.driver</code> to access Selenium's raw <code translate="no">driver</code>.)</p>
```python
from seleniumbase import SB
with SB() as sb:
sb.open("seleniumbase.io/simple/login")
sb.type("#username", "demo_user")
sb.type("#password", "secret_pass")
sb.click('a:contains("Sign in")')
sb.assert_exact_text("Welcome!", "h1")
sb.assert_element("img#image1")
sb.highlight("#image1")
sb.click_link("Sign out")
sb.assert_text("signed out", "#top_message")
```
<p align="left">📙📝 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_login_driver.py">raw_login_driver.py</a>, which uses the <b><code translate="no">Driver</code></b> Manager. Runs with pure <code translate="no">python</code>. (The <code>driver</code> is an improved version of Selenium's raw <code translate="no">driver</code>, with more methods.)</p>
```python
from seleniumbase import Driver
driver = Driver()
try:
driver.open("seleniumbase.io/simple/login")
driver.type("#username", "demo_user")
driver.type("#password", "secret_pass")
driver.click('a:contains("Sign in")')
driver.assert_exact_text("Welcome!", "h1")
driver.assert_element("img#image1")
driver.highlight("#image1")
driver.click_link("Sign out")
driver.assert_text("signed out", "#top_message")
finally:
driver.quit()
```
--------
<a id="python_installation"></a>
<h2><img src="https://seleniumbase.github.io/cdn/img/python_logo.png" title="SeleniumBase" width="42" /> Set up Python & Git:</h2>
<a href="https://www.python.org/downloads/"><img src="https://img.shields.io/pypi/pyversions/seleniumbase.svg?color=FACE42" title="Supported Python Versions" /></a>
🔵 Add <b><a href="https://www.python.org/downloads/">Python</a></b> and <b><a href="https://git-scm.com/">Git</a></b> to your System PATH.
🔵 Using a <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/virtualenv_instructions.md">Python virtual env</a> is recommended.
<a id="install_seleniumbase"></a>
<h2><img src="https://seleniumbase.github.io/img/logo7.png" title="SeleniumBase" width="32" /> Install SeleniumBase:</h2>
**You can install ``seleniumbase`` from [PyPI](https://pypi.org/project/seleniumbase/) or [GitHub](https://github.com/seleniumbase/SeleniumBase):**
🔵 **How to install ``seleniumbase`` from PyPI:**
```bash
pip install seleniumbase
```
* (Add ``--upgrade`` OR ``-U`` to upgrade SeleniumBase.)
* (Add ``--force-reinstall`` to upgrade indirect packages.)
* (Use ``pip3`` if multiple versions of Python are present.)
🔵 **How to install ``seleniumbase`` from a GitHub clone:**
```bash
git clone https://github.com/seleniumbase/SeleniumBase.git
cd SeleniumBase/
pip install -e .
```
🔵 **How to upgrade an existing install from a GitHub clone:**
```bash
git pull
pip install -e .
```
🔵 **Type ``seleniumbase`` or ``sbase`` to verify that SeleniumBase was installed successfully:**
```bash
___ _ _ ___
/ __| ___| |___ _ _ (_)_ _ _ __ | _ ) __ _ ______
\__ \/ -_) / -_) ' \| | \| | ' \ | _ \/ _` (_-< -_)
|___/\___|_\___|_||_|_|\_,_|_|_|_\|___/\__,_/__|___|
----------------------------------------------------
╭──────────────────────────────────────────────────╮
│ * USAGE: "seleniumbase [COMMAND] [PARAMETERS]" │
│ * OR: "sbase [COMMAND] [PARAMETERS]" │
│ │
│ COMMANDS: PARAMETERS / DESCRIPTIONS: │
│ get / install [DRIVER_NAME] [OPTIONS] │
│ methods (List common Python methods) │
│ options (List common pytest options) │
│ behave-options (List common behave options) │
│ gui / commander [OPTIONAL PATH or TEST FILE] │
│ behave-gui (SBase Commander for Behave) │
│ caseplans [OPTIONAL PATH or TEST FILE] │
│ mkdir [DIRECTORY] [OPTIONS] │
│ mkfile [FILE.py] [OPTIONS] │
│ mkrec / codegen [FILE.py] [OPTIONS] │
│ recorder (Open Recorder Desktop App.) │
│ record (If args: mkrec. Else: App.) │
│ mkpres [FILE.py] [LANG] │
│ mkchart [FILE.py] [LANG] │
│ print [FILE] [OPTIONS] │
│ translate [SB_FILE.py] [LANG] [ACTION] │
│ convert [WEBDRIVER_UNITTEST_FILE.py] │
│ extract-objects [SB_FILE.py] │
│ inject-objects [SB_FILE.py] [OPTIONS] │
│ objectify [SB_FILE.py] [OPTIONS] │
│ revert-objects [SB_FILE.py] [OPTIONS] │
│ encrypt / obfuscate │
│ decrypt / unobfuscate │
│ proxy (Start a basic proxy server) │
│ download server (Get Selenium Grid JAR file) │
│ grid-hub [start|stop] [OPTIONS] │
│ grid-node [start|stop] --hub=[HOST/IP] │
│ │
│ * EXAMPLE => "sbase get chromedriver stable" │
│ * For command info => "sbase help [COMMAND]" │
│ * For info on all commands => "sbase --help" │
╰──────────────────────────────────────────────────╯
```
<h3>🔵 Downloading webdrivers:</h3>
✅ SeleniumBase automatically downloads webdrivers as needed, such as ``chromedriver``.
<div></div>
<details>
<summary> ▶️ Here's sample output from a chromedriver download. (<b>click to expand</b>)</summary>
```bash
*** chromedriver to download = 131.0.6778.108 (Latest Stable)
Downloading chromedriver-mac-arm64.zip from:
https://storage.googleapis.com/chrome-for-testing-public/131.0.6778.108/mac-arm64/chromedriver-mac-arm64.zip ...
Download Complete!
Extracting ['chromedriver'] from chromedriver-mac-arm64.zip ...
Unzip Complete!
The file [chromedriver] was saved to:
~/github/SeleniumBase/seleniumbase/drivers/
chromedriver
Making [chromedriver 131.0.6778.108] executable ...
[chromedriver 131.0.6778.108] is now ready for use!
```
</details>
<a id="basic_example_and_usage"></a>
<h2><img src="https://seleniumbase.github.io/img/logo7.png" title="SeleniumBase" width="32" /> Basic Example / Usage:</h2>
🔵 If you've cloned SeleniumBase, you can run tests from the [examples/](https://github.com/seleniumbase/SeleniumBase/tree/master/examples) folder.
<p align="left">Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py">my_first_test.py</a>:</p>
```bash
cd examples/
pytest my_first_test.py
```
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py"><img src="https://seleniumbase.github.io/cdn/gif/fast_swag_2.gif" alt="SeleniumBase Test" title="SeleniumBase Test" width="480" /></a>
<p align="left"><b>Here's the full code for <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py">my_first_test.py</a>:</b></p>
```python
from seleniumbase import BaseCase
BaseCase.main(__name__, __file__)
class MyTestClass(BaseCase):
def test_swag_labs(self):
self.open("https://www.saucedemo.com")
self.type("#user-name", "standard_user")
self.type("#password", "secret_sauce\n")
self.assert_element("div.inventory_list")
self.assert_exact_text("Products", "span.title")
self.click('button[name*="backpack"]')
self.click("#shopping_cart_container a")
self.assert_exact_text("Your Cart", "span.title")
self.assert_text("Backpack", "div.cart_item")
self.click("button#checkout")
self.type("#first-name", "SeleniumBase")
self.type("#last-name", "Automation")
self.type("#postal-code", "77123")
self.click("input#continue")
self.assert_text("Checkout: Overview")
self.assert_text("Backpack", "div.cart_item")
self.assert_text("29.99", "div.inventory_item_price")
self.click("button#finish")
self.assert_exact_text("Thank you for your order!", "h2")
self.assert_element('img[alt="Pony Express"]')
self.js_click("a#logout_sidebar_link")
self.assert_element("div#login_button_container")
```
* By default, **[CSS Selectors](https://www.w3schools.com/cssref/css_selectors.asp)** are used for finding page elements.
* If you're new to CSS Selectors, games like [CSS Diner](http://flukeout.github.io/) can help you learn.
* For more reading, [here's an advanced guide on CSS attribute selectors](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors).
<a id="common_methods"></a>
<h3><img src="https://seleniumbase.github.io/img/logo7.png" title="SeleniumBase" width="32" /> Here are some common SeleniumBase methods:</h3>
```python
self.open(url) # Navigate the browser window to the URL.
self.type(selector, text) # Update the field with the text.
self.click(selector) # Click the element with the selector.
self.click_link(link_text) # Click the link containing text.
self.go_back() # Navigate back to the previous URL.
self.select_option_by_text(dropdown_selector, option)
self.hover_and_click(hover_selector, click_selector)
self.drag_and_drop(drag_selector, drop_selector)
self.get_text(selector) # Get the text from the element.
self.get_current_url() # Get the URL of the current page.
self.get_page_source() # Get the HTML of the current page.
self.get_attribute(selector, attribute) # Get element attribute.
self.get_title() # Get the title of the current page.
self.switch_to_frame(frame) # Switch into the iframe container.
self.switch_to_default_content() # Leave the iframe container.
self.open_new_window() # Open a new window in the same browser.
self.switch_to_window(window) # Switch to the browser window.
self.switch_to_default_window() # Switch to the original window.
self.get_new_driver(OPTIONS) # Open a new driver with OPTIONS.
self.switch_to_driver(driver) # Switch to the browser driver.
self.switch_to_default_driver() # Switch to the original driver.
self.wait_for_element(selector) # Wait until element is visible.
self.is_element_visible(selector) # Return element visibility.
self.is_text_visible(text, selector) # Return text visibility.
self.sleep(seconds) # Do nothing for the given amount of time.
self.save_screenshot(name) # Save a screenshot in .png format.
self.assert_element(selector) # Verify the element is visible.
self.assert_text(text, selector) # Verify text in the element.
self.assert_exact_text(text, selector) # Verify text is exact.
self.assert_title(title) # Verify the title of the web page.
self.assert_downloaded_file(file) # Verify file was downloaded.
self.assert_no_404_errors() # Verify there are no broken links.
self.assert_no_js_errors() # Verify there are no JS errors.
```
🔵 For the complete list of SeleniumBase methods, see: <b><a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/method_summary.md">Method Summary</a></b>
<a id="fun_facts"></a>
<h2><img src="https://seleniumbase.github.io/img/logo7.png" title="SeleniumBase" width="32" /> Fun Facts / Learn More:</h2>
<p>✅ SeleniumBase automatically handles common <a href="https://www.selenium.dev/documentation/webdriver/" target="_blank">WebDriver</a> actions such as launching web browsers before tests, saving screenshots during failures, and closing web browsers after tests.</p>
<p>✅ SeleniumBase lets you customize tests via <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/customizing_test_runs.md">command-line options</a>.</p>
<p>✅ SeleniumBase uses simple syntax for commands. Example:</p>
```python
self.type("input", "dogs\n") # (The "\n" presses ENTER)
```
Most SeleniumBase scripts can be run with <code translate="no">pytest</code>, <code translate="no">pynose</code>, or pure <code translate="no">python</code>. Not all test runners can run all test formats. For example, tests that use the ``sb`` pytest fixture can only be run with ``pytest``. (See <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md">Syntax Formats</a>) There's also a <a href="https://behave.readthedocs.io/en/stable/gherkin.html#features" target="_blank">Gherkin</a> test format that runs with <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/behave_bdd/ReadMe.md">behave</a>.
```bash
pytest coffee_cart_tests.py --rs
pytest test_sb_fixture.py --demo
pytest test_suite.py --rs --html=report.html --dashboard
pynose basic_test.py --mobile
pynose test_suite.py --headless --report --show-report
python raw_sb.py
python raw_test_scripts.py
behave realworld.feature
behave calculator.feature -D rs -D dashboard
```
<p>✅ <code translate="no">pytest</code> includes automatic test discovery. If you don't specify a specific file or folder to run, <code translate="no">pytest</code> will automatically search through all subdirectories for tests to run based on the following criteria:</p>
* Python files that start with ``test_`` or end with ``_test.py``.
* Python methods that start with ``test_``.
With a SeleniumBase [pytest.ini](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/pytest.ini) file present, you can modify default discovery settings. The Python class name can be anything because ``seleniumbase.BaseCase`` inherits ``unittest.TestCase`` to trigger autodiscovery.
<p>✅ You can do a pre-flight check to see which tests would get discovered by <code translate="no">pytest</code> before the actual run:</p>
```bash
pytest --co -q
```
<p>✅ You can be more specific when calling <code translate="no">pytest</code> or <code translate="no">pynose</code> on a file:</p>
```bash
pytest [FILE_NAME.py]::[CLASS_NAME]::[METHOD_NAME]
pynose [FILE_NAME.py]:[CLASS_NAME].[METHOD_NAME]
```
<p>✅ No More Flaky Tests! SeleniumBase methods automatically wait for page elements to finish loading before interacting with them (<i>up to a timeout limit</i>). This means <b>you no longer need random <span><code translate="no">time.sleep()</code></span> statements</b> in your scripts.</p>
<img src="https://img.shields.io/badge/Flaky%20Tests%3F-%20NO%21-11BBDD.svg" alt="NO MORE FLAKY TESTS!" />
✅ SeleniumBase supports all major browsers and operating systems:
<p><b>Browsers:</b> Chrome, Edge, Firefox, and Safari.</p>
<p><b>Systems:</b> Linux/Ubuntu, macOS, and Windows.</p>
✅ SeleniumBase works on all popular CI/CD platforms:
<p><a href="https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/github/workflows/ReadMe.md"><img alt="GitHub Actions integration" src="https://img.shields.io/badge/GitHub_Actions-12B2C2.svg?logo=GitHubActions&logoColor=CFFFC2" /></a> <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/azure/jenkins/ReadMe.md"><img alt="Jenkins integration" src="https://img.shields.io/badge/Jenkins-32B242.svg?logo=jenkins&logoColor=white" /></a> <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/azure/azure_pipelines/ReadMe.md"><img alt="Azure integration" src="https://img.shields.io/badge/Azure-2288EE.svg?logo=AzurePipelines&logoColor=white" /></a> <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/google_cloud/ReadMe.md"><img alt="Google Cloud integration" src="https://img.shields.io/badge/Google_Cloud-11CAE8.svg?logo=GoogleCloud&logoColor=EE0066" /></a> <a href="#utilizing_advanced_features"><img alt="AWS integration" src="https://img.shields.io/badge/AWS-4488DD.svg?logo=AmazonAWS&logoColor=FFFF44" /></a> <a href="https://en.wikipedia.org/wiki/Personal_computer" target="_blank"><img alt="Your Computer" src="https://img.shields.io/badge/💻_Your_Computer-44E6E6.svg" /></a></p>
<p>✅ SeleniumBase includes an automated/manual hybrid solution called <b><a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/master_qa/ReadMe.md">MasterQA</a></b> to speed up manual testing with automation while manual testers handle validation.</p>
<p>✅ SeleniumBase supports <a href="https://github.com/seleniumbase/SeleniumBase/tree/master/examples/offline_examples">running tests while offline</a> (<i>assuming webdrivers have previously been downloaded when online</i>).</p>
<p>✅ For a full list of SeleniumBase features, <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/features_list.md">Click Here</a>.</p>
<a id="demo_mode_and_debugging"></a>
<h2><img src="https://seleniumbase.github.io/img/logo7.png" title="SeleniumBase" width="32" /> Demo Mode / Debugging:</h2>
🔵 <b>Demo Mode</b> helps you see what a test is doing. If a test is moving too fast for your eyes, run it in <b>Demo Mode</b> to pause the browser briefly between actions, highlight page elements being acted on, and display assertions:
```bash
pytest my_first_test.py --demo
```
🔵 ``time.sleep(seconds)`` can be used to make a test wait at a specific spot:
```python
import time; time.sleep(3) # Do nothing for 3 seconds.
```
🔵 **Debug Mode** with Python's built-in **[pdb](https://docs.python.org/3/library/pdb.html)** library helps you debug tests:
```python
import pdb; pdb.set_trace()
import pytest; pytest.set_trace()
breakpoint() # Shortcut for "import pdb; pdb.set_trace()"
```
> (**``pdb``** commands: ``n``, ``c``, ``s``, ``u``, ``d`` => ``next``, ``continue``, ``step``, ``up``, ``down``)
🔵 To pause an active test that throws an exception or error, (*and keep the browser window open while **Debug Mode** begins in the console*), add **``--pdb``** as a ``pytest`` option:
```bash
pytest test_fail.py --pdb
```
🔵 To start tests in Debug Mode, add **``--trace``** as a ``pytest`` option:
```bash
pytest test_coffee_cart.py --trace
```
<a href="https://github.com/mdmintz/pdbp"><img src="https://seleniumbase.github.io/cdn/gif/coffee_pdbp.gif" alt="SeleniumBase test with the pdbp (Pdb+) debugger" title="SeleniumBase test with the pdbp (Pdb+) debugger" /></a>
<a id="command_line_options"></a>
<h2>🔵 Command-line Options:</h2>
<a id="pytest_options"></a>
✅ Here are some useful command-line options that come with <code translate="no">pytest</code>:
```bash
-v # Verbose mode. Prints the full name of each test and shows more details.
-q # Quiet mode. Print fewer details in the console output when running tests.
-x # Stop running the tests after the first failure is reached.
--html=report.html # Creates a detailed pytest-html report after tests finish.
--co | --collect-only # Show what tests would get run. (Without running them)
--co -q # (Both options together!) - Do a dry run with full test names shown.
-n=NUM # Multithread the tests using that many threads. (Speed up test runs!)
-s # See print statements. (Should be on by default with pytest.ini present.)
--junit-xml=report.xml # Creates a junit-xml report after tests finish.
--pdb # If a test fails, enter Post Mortem Debug Mode. (Don't use with CI!)
--trace # Enter Debug Mode at the beginning of each test. (Don't use with CI!)
-m=MARKER # Run tests with the specified pytest marker.
```
<a id="new_pytest_options"></a>
✅ SeleniumBase provides additional <code translate="no">pytest</code> command-line options for tests:
```bash
--browser=BROWSER # (The web browser to use. Default: "chrome".)
--chrome # (Shortcut for "--browser=chrome". On by default.)
--edge # (Shortcut for "--browser=edge".)
--firefox # (Shortcut for "--browser=firefox".)
--safari # (Shortcut for "--browser=safari".)
--settings-file=FILE # (Override default SeleniumBase settings.)
--env=ENV # (Set the test env. Access with "self.env" in tests.)
--account=STR # (Set account. Access with "self.account" in tests.)
--data=STRING # (Extra test data. Access with "self.data" in tests.)
--var1=STRING # (Extra test data. Access with "self.var1" in tests.)
--var2=STRING # (Extra test data. Access with "self.var2" in tests.)
--var3=STRING # (Extra test data. Access with "self.var3" in tests.)
--variables=DICT # (Extra test data. Access with "self.variables".)
--user-data-dir=DIR # (Set the Chrome user data directory to use.)
--protocol=PROTOCOL # (The Selenium Grid protocol: http|https.)
--server=SERVER # (The Selenium Grid server/IP used for tests.)
--port=PORT # (The Selenium Grid port used by the test server.)
--cap-file=FILE # (The web browser's desired capabilities to use.)
--cap-string=STRING # (The web browser's desired capabilities to use.)
--proxy=SERVER:PORT # (Connect to a proxy server:port as tests are running)
--proxy=USERNAME:PASSWORD@SERVER:PORT # (Use an authenticated proxy server)
--proxy-bypass-list=STRING # (";"-separated hosts to bypass, Eg "*.foo.com")
--proxy-pac-url=URL # (Connect to a proxy server using a PAC_URL.pac file.)
--proxy-pac-url=USERNAME:PASSWORD@URL # (Authenticated proxy with PAC URL.)
--proxy-driver # (If a driver download is needed, will use: --proxy=PROXY.)
--multi-proxy # (Allow multiple authenticated proxies when multi-threaded.)
--agent=STRING # (Modify the web browser's User-Agent string.)
--mobile # (Use the mobile device emulator while running tests.)
--metrics=STRING # (Set mobile metrics: "CSSWidth,CSSHeight,PixelRatio".)
--chromium-arg="ARG=N,ARG2" # (Set Chromium args, ","-separated, no spaces.)
--firefox-arg="ARG=N,ARG2" # (Set Firefox args, comma-separated, no spaces.)
--firefox-pref=SET # (Set a Firefox preference:value set, comma-separated.)
--extension-zip=ZIP # (Load a Chrome Extension .zip|.crx, comma-separated.)
--extension-dir=DIR # (Load a Chrome Extension directory, comma-separated.)
--disable-features="F1,F2" # (Disable features, comma-separated, no spaces.)
--binary-location=PATH # (Set path of the Chromium browser binary to use.)
--driver-version=VER # (Set the chromedriver or uc_driver version to use.)
--sjw # (Skip JS Waits for readyState to be "complete" or Angular to load.)
--wfa # (Wait for AngularJS to be done loading after specific web actions.)
--pls=PLS # (Set pageLoadStrategy on Chrome: "normal", "eager", or "none".)
--headless # (The default headless mode. Linux uses this mode by default.)
--headless1 # (Use Chrome's old headless mode. Fast, but has limitations.)
--headless2 # (Use Chrome's new headl | text/markdown | Michael Mintz | mdmintz@gmail.com | Michael Mintz | null | MIT | null | [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Environment :: MacOS X",
"Environment :: Win32 (MS Windows)",
"Environment :: Web Environment",
"Framework :: Pytest",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Internet",
"Topic :: Scientific/Engineering",
"Topic :: Software Development",
"Topic :: Software Development :: Quality Assurance",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Testing",
"Topic :: Software Development :: Testing :: Acceptance",
"Topic :: Software Development :: Testing :: Traffic Generation",
"Topic :: Utilities"
] | [
"Windows"
] | https://github.com/seleniumbase/SeleniumBase | null | >=3.9 | [] | [] | [] | [
"seleniumbase>=4.47.0"
] | [] | [] | [] | [
"Homepage, https://github.com/seleniumbase/SeleniumBase",
"Changelog, https://github.com/seleniumbase/SeleniumBase/releases",
"Download, https://pypi.org/project/seleniumbase/#files",
"Blog, https://seleniumbase.com/",
"Discord, https://discord.gg/EdhQTn3EyE",
"PyPI, https://pypi.org/project/seleniumbase/",
"Source, https://github.com/seleniumbase/SeleniumBase",
"Repository, https://github.com/seleniumbase/SeleniumBase",
"Documentation, https://seleniumbase.io/"
] | twine/6.2.0 CPython/3.13.5 | 2026-02-20T18:57:54.798596 | basecase-4.47.0.tar.gz | 67,927 | 14/fe/1bc17a96c7b397403929903d86c06ac56743498e71a6c026ce46828aadff/basecase-4.47.0.tar.gz | source | sdist | null | false | db0ca0cc13e1d13e508cde5716ad2f69 | 69cc9facd0f3ab6cea5f6e6cb342bbf5c592425eca1d3e1be1c7b93f203a7439 | 14fe1bc17a96c7b397403929903d86c06ac56743498e71a6c026ce46828aadff | null | [] | 172 |
2.4 | selenium-base | 4.47.0 | A complete web automation framework for end-to-end testing. | **[<img src="https://img.shields.io/badge/pypi-selenium--base-22AAEE.svg" alt="pypi" />](https://pypi.python.org/pypi/selenium-base) is a proxy for [<img src="https://img.shields.io/badge/pypi-seleniumbase-22AAEE.svg" alt="pypi" />](https://pypi.python.org/pypi/seleniumbase)**
****
<!-- SeleniumBase Docs -->
<meta property="og:site_name" content="SeleniumBase">
<meta property="og:title" content="SeleniumBase: Python Web Automation and E2E Testing" />
<meta property="og:description" content="Fast, easy, and reliable Web/UI testing with Python." />
<meta property="og:keywords" content="Python, pytest, selenium, webdriver, testing, automation, seleniumbase, framework, dashboard, recorder, reports, screenshots">
<meta property="og:image" content="https://seleniumbase.github.io/cdn/img/mac_sb_logo_5b.png" />
<link rel="icon" href="https://seleniumbase.github.io/img/logo7.png" />
<h1>SeleniumBase</h1>
<p align="center"><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.github.io/cdn/img/super_logo_sb3.png" alt="SeleniumBase" title="SeleniumBase" width="350" /></a></p>
<p align="center" class="hero__title"><b>All-in-one Browser Automation Framework:<br />Web Crawling / Testing / Scraping / Stealth</b></p>
<p align="center"><a href="https://pypi.python.org/pypi/seleniumbase" target="_blank"><img src="https://img.shields.io/pypi/v/seleniumbase.svg?color=3399EE" alt="PyPI version" /></a> <a href="https://github.com/seleniumbase/SeleniumBase/releases" target="_blank"><img src="https://img.shields.io/github/v/release/seleniumbase/SeleniumBase.svg?color=22AAEE" alt="GitHub version" /></a> <a href="https://seleniumbase.io"><img src="https://img.shields.io/badge/docs-seleniumbase.io-11BBAA.svg" alt="SeleniumBase Docs" /></a> <a href="https://github.com/seleniumbase/SeleniumBase/actions" target="_blank"><img src="https://github.com/seleniumbase/SeleniumBase/workflows/CI%20build/badge.svg" alt="SeleniumBase GitHub Actions" /></a> <a href="https://discord.gg/EdhQTn3EyE" target="_blank"><img src="https://img.shields.io/badge/join-discord-infomational" alt="Join the SeleniumBase chat on Discord"/></a></p>
<p align="center">
<a href="#python_installation">🚀 Start</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/features_list.md">🏰 Features</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/customizing_test_runs.md">🎛️ Options</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/ReadMe.md">📚 Examples</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/console_scripts/ReadMe.md">🌠 Scripts</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/mobile_testing.md">📱 Mobile</a>
<br />
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/method_summary.md">📘 APIs</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md"> 🔠 Formats</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/recorder_mode.md">🔴 Recorder</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/example_logs/ReadMe.md">📊 Dashboard</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/locale_codes.md">🗾 Locales</a> |
<a href="https://seleniumbase.io/devices/?url=seleniumbase.com">💻 Farm</a>
<br />
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/commander.md">🎖️ GUI</a> |
<a href="https://seleniumbase.io/demo_page">📰 TestPage</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/uc_mode.md">👤 UC Mode</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/ReadMe.md">🐙 CDP Mode</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/chart_maker/ReadMe.md">📶 Charts</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/utilities/selenium_grid/ReadMe.md">🌐 Grid</a>
<br />
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/how_it_works.md">👁️ How</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/tree/master/examples/migration/raw_selenium">🚝 Migrate</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/case_plans.md">🗂️ CasePlans</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/tree/master/examples/boilerplates">♻️ Template</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/master_qa/ReadMe.md">🧬 Hybrid</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/tour_examples/ReadMe.md">🚎 Tours</a>
<br />
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/github/workflows/ReadMe.md">🤖 CI/CD</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/js_package_manager.md">🕹️ JSMgr</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/translations.md">🌏 Translator</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/presenter/ReadMe.md">🎞️ Presenter</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/dialog_boxes/ReadMe.md">🛂 Dialog</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/visual_testing/ReadMe.md">🖼️ Visual</a>
<br />
</p>
<p>SeleniumBase is the professional toolkit for web automation activities. Built for testing websites, bypassing CAPTCHAs, enhancing productivity, completing tasks, and scaling your business.</p>
--------
📚 Learn from [**over 200 examples** in the **SeleniumBase/examples/** folder](https://github.com/seleniumbase/SeleniumBase/tree/master/examples).
🐙 Note that <a translate="no" href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/uc_mode.md"><b>UC Mode</b></a> / <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/ReadMe.md"><b>CDP Mode</b></a> (Stealth Mode) have their own ReadMe files.
ℹ️ Most scripts run with raw <code translate="no"><b>python</b></code>, although some scripts use <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md">Syntax Formats</a> that expect <a href="https://docs.pytest.org/en/latest/how-to/usage.html" translate="no"><b>pytest</b></a> (a Python unit-testing framework included with SeleniumBase that can discover, collect, and run tests automatically).
--------
<p align="left">📗 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_google.py">raw_google.py</a>, which performs a Google search:</p>
```python
from seleniumbase import SB
with SB(test=True, uc=True) as sb:
sb.open("https://google.com/ncr")
sb.type('[title="Search"]', "SeleniumBase GitHub page\n")
sb.click('[href*="github.com/seleniumbase/"]')
sb.save_screenshot_to_logs() # ./latest_logs/
print(sb.get_page_title())
```
> `python raw_google.py`
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_google.py"><img src="https://seleniumbase.github.io/cdn/gif/google_search.gif" alt="SeleniumBase Test" title="SeleniumBase Test" width="420" /></a>
--------
<p align="left">📗 Here's an example of bypassing Cloudflare's challenge page: <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/raw_gitlab.py">SeleniumBase/examples/cdp_mode/raw_gitlab.py</a></p>
```python
from seleniumbase import SB
with SB(uc=True, test=True, locale="en") as sb:
url = "https://gitlab.com/users/sign_in"
sb.activate_cdp_mode(url)
sb.uc_gui_click_captcha()
sb.sleep(2)
```
<img src="https://seleniumbase.github.io/other/cf_sec.jpg" title="SeleniumBase" width="332"> <img src="https://seleniumbase.github.io/other/gitlab_bypass.png" title="SeleniumBase" width="288">
--------
<p align="left">📗 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_get_swag.py">test_get_swag.py</a>, which tests an e-commerce site:</p>
```python
from seleniumbase import BaseCase
BaseCase.main(__name__, __file__) # Call pytest
class MyTestClass(BaseCase):
def test_swag_labs(self):
self.open("https://www.saucedemo.com")
self.type("#user-name", "standard_user")
self.type("#password", "secret_sauce\n")
self.assert_element("div.inventory_list")
self.click('button[name*="backpack"]')
self.click("#shopping_cart_container a")
self.assert_text("Backpack", "div.cart_item")
self.click("button#checkout")
self.type("input#first-name", "SeleniumBase")
self.type("input#last-name", "Automation")
self.type("input#postal-code", "77123")
self.click("input#continue")
self.click("button#finish")
self.assert_text("Thank you for your order!")
```
> `pytest test_get_swag.py`
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_get_swag.py"><img src="https://seleniumbase.github.io/cdn/gif/fast_swag_2.gif" alt="SeleniumBase Test" title="SeleniumBase Test" width="480" /></a>
> (The default browser is ``--chrome`` if not set.)
--------
<p align="left">📗 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_coffee_cart.py" target="_blank">test_coffee_cart.py</a>, which verifies an e-commerce site:</p>
```bash
pytest test_coffee_cart.py --demo
```
<p align="left"><a href="https://seleniumbase.io/coffee/" target="_blank"><img src="https://seleniumbase.github.io/cdn/gif/coffee_cart.gif" width="480" alt="SeleniumBase Coffee Cart Test" title="SeleniumBase Coffee Cart Test" /></a></p>
> <p>(<code translate="no">--demo</code> mode slows down tests and highlights actions)</p>
--------
<a id="multiple_examples"></a>
<p align="left">📗 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_demo_site.py" target="_blank">test_demo_site.py</a>, which covers several actions:</p>
```bash
pytest test_demo_site.py
```
<p align="left"><a href="https://seleniumbase.io/demo_page" target="_blank"><img src="https://seleniumbase.github.io/cdn/gif/demo_page_5.gif" width="480" alt="SeleniumBase Example" title="SeleniumBase Example" /></a></p>
> Easy to type, click, select, toggle, drag & drop, and more.
(For more examples, see the <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/ReadMe.md">SeleniumBase/examples/</a> folder.)
--------
<p align="left"><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.github.io/cdn/img/super_logo_sb3.png" alt="SeleniumBase" title="SeleniumBase" width="232" /></a></p>
<blockquote>
<p dir="auto"><strong>Explore the README:</strong></p>
<ul dir="auto">
<li><a href="#install_seleniumbase" ><strong>Get Started / Installation</strong></a></li>
<li><a href="#basic_example_and_usage"><strong>Basic Example / Usage</strong></a></li>
<li><a href="#common_methods" ><strong>Common Test Methods</strong></a></li>
<li><a href="#fun_facts" ><strong>Fun Facts / Learn More</strong></a></li>
<li><a href="#demo_mode_and_debugging"><strong>Demo Mode / Debugging</strong></a></li>
<li><a href="#command_line_options" ><strong>Command-line Options</strong></a></li>
<li><a href="#directory_configuration"><strong>Directory Configuration</strong></a></li>
<li><a href="#seleniumbase_dashboard" ><strong>SeleniumBase Dashboard</strong></a></li>
<li><a href="#creating_visual_reports"><strong>Generating Test Reports</strong></a></li>
</ul>
</blockquote>
--------
<details>
<summary> ▶️ How is <b>SeleniumBase</b> different from raw Selenium? (<b>click to expand</b>)</summary>
<div>
<p>💡 SeleniumBase is a Python framework for browser automation and testing. SeleniumBase uses <a href="https://www.w3.org/TR/webdriver2/#endpoints" target="_blank">Selenium/WebDriver</a> APIs and incorporates test-runners such as <code translate="no">pytest</code>, <code translate="no">pynose</code>, and <code translate="no">behave</code> to provide organized structure, test discovery, test execution, test state (<i>eg. passed, failed, or skipped</i>), and command-line options for changing default settings (<i>eg. browser selection</i>). With raw Selenium, you would need to set up your own options-parser for configuring tests from the command-line.</p>
<p>💡 SeleniumBase's driver manager gives you more control over automatic driver downloads. (Use <code translate="no">--driver-version=VER</code> with your <code translate="no">pytest</code> run command to specify the version.) By default, SeleniumBase will download a driver version that matches your major browser version if not set.</p>
<p>💡 SeleniumBase automatically detects between CSS Selectors and XPath, which means you don't need to specify the type of selector in your commands (<i>but optionally you could</i>).</p>
<p>💡 SeleniumBase methods often perform multiple actions in a single method call. For example, <code translate="no">self.type(selector, text)</code> does the following:<br />1. Waits for the element to be visible.<br />2. Waits for the element to be interactive.<br />3. Clears the text field.<br />4. Types in the new text.<br />5. Presses Enter/Submit if the text ends in <code translate="no">"\n"</code>.<br />With raw Selenium, those actions require multiple method calls.</p>
<p>💡 SeleniumBase uses default timeout values when not set:<br />
✅ <code translate="no">self.click("button")</code><br />
With raw Selenium, methods would fail instantly (<i>by default</i>) if an element needed more time to load:<br />
❌ <code translate="no">self.driver.find_element(by="css selector", value="button").click()</code><br />
(Reliable code is better than unreliable code.)</p>
<p>💡 SeleniumBase lets you change the explicit timeout values of methods:<br />
✅ <code translate="no">self.click("button", timeout=10)</code><br />
With raw Selenium, that requires more code:<br />
❌ <code translate="no">WebDriverWait(driver, 10).until(EC.element_to_be_clickable("css selector", "button")).click()</code><br />
(Simple code is better than complex code.)</p>
<p>💡 SeleniumBase gives you clean error output when a test fails. With raw Selenium, error messages can get very messy.</p>
<p>💡 SeleniumBase gives you the option to generate a dashboard and reports for tests. It also saves screenshots from failing tests to the <code translate="no">./latest_logs/</code> folder. Raw <a href="https://www.selenium.dev/documentation/webdriver/" translate="no" target="_blank">Selenium</a> does not have these options out-of-the-box.</p>
<p>💡 SeleniumBase includes desktop GUI apps for running tests, such as <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/commander.md" translate="no">SeleniumBase Commander</a> for <code translate="no">pytest</code> and <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/behave_bdd/ReadMe.md" translate="no">SeleniumBase Behave GUI</a> for <code translate="no">behave</code>.</p>
<p>💡 SeleniumBase has its own <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/recorder_mode.md">Recorder / Test Generator</a> for creating tests from manual browser actions.</p>
<p>💡 SeleniumBase comes with <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/case_plans.md">test case management software, ("CasePlans")</a>, for organizing tests and step descriptions.</p>
<p>💡 SeleniumBase includes tools for <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/chart_maker/ReadMe.md">building data apps, ("ChartMaker")</a>, which can generate JavaScript from Python.</p>
</div>
</details>
--------
<p>📚 <b>Learn about different ways of writing tests:</b></p>
<p align="left">📗📝 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_simple_login.py">test_simple_login.py</a>, which uses <code translate="no"><a href="https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/fixtures/base_case.py">BaseCase</a></code> class inheritance, and runs with <a href="https://docs.pytest.org/en/latest/how-to/usage.html">pytest</a> or <a href="https://github.com/mdmintz/pynose">pynose</a>. (Use <code translate="no">self.driver</code> to access Selenium's raw <code translate="no">driver</code>.)</p>
```python
from seleniumbase import BaseCase
BaseCase.main(__name__, __file__)
class TestSimpleLogin(BaseCase):
def test_simple_login(self):
self.open("seleniumbase.io/simple/login")
self.type("#username", "demo_user")
self.type("#password", "secret_pass")
self.click('a:contains("Sign in")')
self.assert_exact_text("Welcome!", "h1")
self.assert_element("img#image1")
self.highlight("#image1")
self.click_link("Sign out")
self.assert_text("signed out", "#top_message")
```
<p align="left">📘📝 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_login_sb.py">raw_login_sb.py</a>, which uses the <b><code translate="no">SB</code></b> Context Manager. Runs with pure <code translate="no">python</code>. (Use <code translate="no">sb.driver</code> to access Selenium's raw <code translate="no">driver</code>.)</p>
```python
from seleniumbase import SB
with SB() as sb:
sb.open("seleniumbase.io/simple/login")
sb.type("#username", "demo_user")
sb.type("#password", "secret_pass")
sb.click('a:contains("Sign in")')
sb.assert_exact_text("Welcome!", "h1")
sb.assert_element("img#image1")
sb.highlight("#image1")
sb.click_link("Sign out")
sb.assert_text("signed out", "#top_message")
```
<p align="left">📙📝 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_login_driver.py">raw_login_driver.py</a>, which uses the <b><code translate="no">Driver</code></b> Manager. Runs with pure <code translate="no">python</code>. (The <code>driver</code> is an improved version of Selenium's raw <code translate="no">driver</code>, with more methods.)</p>
```python
from seleniumbase import Driver
driver = Driver()
try:
driver.open("seleniumbase.io/simple/login")
driver.type("#username", "demo_user")
driver.type("#password", "secret_pass")
driver.click('a:contains("Sign in")')
driver.assert_exact_text("Welcome!", "h1")
driver.assert_element("img#image1")
driver.highlight("#image1")
driver.click_link("Sign out")
driver.assert_text("signed out", "#top_message")
finally:
driver.quit()
```
--------
<a id="python_installation"></a>
<h2><img src="https://seleniumbase.github.io/cdn/img/python_logo.png" title="SeleniumBase" width="42" /> Set up Python & Git:</h2>
<a href="https://www.python.org/downloads/"><img src="https://img.shields.io/pypi/pyversions/seleniumbase.svg?color=FACE42" title="Supported Python Versions" /></a>
🔵 Add <b><a href="https://www.python.org/downloads/">Python</a></b> and <b><a href="https://git-scm.com/">Git</a></b> to your System PATH.
🔵 Using a <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/virtualenv_instructions.md">Python virtual env</a> is recommended.
<a id="install_seleniumbase"></a>
<h2><img src="https://seleniumbase.github.io/img/logo7.png" title="SeleniumBase" width="32" /> Install SeleniumBase:</h2>
**You can install ``seleniumbase`` from [PyPI](https://pypi.org/project/seleniumbase/) or [GitHub](https://github.com/seleniumbase/SeleniumBase):**
🔵 **How to install ``seleniumbase`` from PyPI:**
```bash
pip install seleniumbase
```
* (Add ``--upgrade`` OR ``-U`` to upgrade SeleniumBase.)
* (Add ``--force-reinstall`` to upgrade indirect packages.)
* (Use ``pip3`` if multiple versions of Python are present.)
🔵 **How to install ``seleniumbase`` from a GitHub clone:**
```bash
git clone https://github.com/seleniumbase/SeleniumBase.git
cd SeleniumBase/
pip install -e .
```
🔵 **How to upgrade an existing install from a GitHub clone:**
```bash
git pull
pip install -e .
```
🔵 **Type ``seleniumbase`` or ``sbase`` to verify that SeleniumBase was installed successfully:**
```bash
___ _ _ ___
/ __| ___| |___ _ _ (_)_ _ _ __ | _ ) __ _ ______
\__ \/ -_) / -_) ' \| | \| | ' \ | _ \/ _` (_-< -_)
|___/\___|_\___|_||_|_|\_,_|_|_|_\|___/\__,_/__|___|
----------------------------------------------------
╭──────────────────────────────────────────────────╮
│ * USAGE: "seleniumbase [COMMAND] [PARAMETERS]" │
│ * OR: "sbase [COMMAND] [PARAMETERS]" │
│ │
│ COMMANDS: PARAMETERS / DESCRIPTIONS: │
│ get / install [DRIVER_NAME] [OPTIONS] │
│ methods (List common Python methods) │
│ options (List common pytest options) │
│ behave-options (List common behave options) │
│ gui / commander [OPTIONAL PATH or TEST FILE] │
│ behave-gui (SBase Commander for Behave) │
│ caseplans [OPTIONAL PATH or TEST FILE] │
│ mkdir [DIRECTORY] [OPTIONS] │
│ mkfile [FILE.py] [OPTIONS] │
│ mkrec / codegen [FILE.py] [OPTIONS] │
│ recorder (Open Recorder Desktop App.) │
│ record (If args: mkrec. Else: App.) │
│ mkpres [FILE.py] [LANG] │
│ mkchart [FILE.py] [LANG] │
│ print [FILE] [OPTIONS] │
│ translate [SB_FILE.py] [LANG] [ACTION] │
│ convert [WEBDRIVER_UNITTEST_FILE.py] │
│ extract-objects [SB_FILE.py] │
│ inject-objects [SB_FILE.py] [OPTIONS] │
│ objectify [SB_FILE.py] [OPTIONS] │
│ revert-objects [SB_FILE.py] [OPTIONS] │
│ encrypt / obfuscate │
│ decrypt / unobfuscate │
│ proxy (Start a basic proxy server) │
│ download server (Get Selenium Grid JAR file) │
│ grid-hub [start|stop] [OPTIONS] │
│ grid-node [start|stop] --hub=[HOST/IP] │
│ │
│ * EXAMPLE => "sbase get chromedriver stable" │
│ * For command info => "sbase help [COMMAND]" │
│ * For info on all commands => "sbase --help" │
╰──────────────────────────────────────────────────╯
```
<h3>🔵 Downloading webdrivers:</h3>
✅ SeleniumBase automatically downloads webdrivers as needed, such as ``chromedriver``.
<div></div>
<details>
<summary> ▶️ Here's sample output from a chromedriver download. (<b>click to expand</b>)</summary>
```bash
*** chromedriver to download = 131.0.6778.108 (Latest Stable)
Downloading chromedriver-mac-arm64.zip from:
https://storage.googleapis.com/chrome-for-testing-public/131.0.6778.108/mac-arm64/chromedriver-mac-arm64.zip ...
Download Complete!
Extracting ['chromedriver'] from chromedriver-mac-arm64.zip ...
Unzip Complete!
The file [chromedriver] was saved to:
~/github/SeleniumBase/seleniumbase/drivers/
chromedriver
Making [chromedriver 131.0.6778.108] executable ...
[chromedriver 131.0.6778.108] is now ready for use!
```
</details>
<a id="basic_example_and_usage"></a>
<h2><img src="https://seleniumbase.github.io/img/logo7.png" title="SeleniumBase" width="32" /> Basic Example / Usage:</h2>
🔵 If you've cloned SeleniumBase, you can run tests from the [examples/](https://github.com/seleniumbase/SeleniumBase/tree/master/examples) folder.
<p align="left">Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py">my_first_test.py</a>:</p>
```bash
cd examples/
pytest my_first_test.py
```
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py"><img src="https://seleniumbase.github.io/cdn/gif/fast_swag_2.gif" alt="SeleniumBase Test" title="SeleniumBase Test" width="480" /></a>
<p align="left"><b>Here's the full code for <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py">my_first_test.py</a>:</b></p>
```python
from seleniumbase import BaseCase
BaseCase.main(__name__, __file__)
class MyTestClass(BaseCase):
def test_swag_labs(self):
self.open("https://www.saucedemo.com")
self.type("#user-name", "standard_user")
self.type("#password", "secret_sauce\n")
self.assert_element("div.inventory_list")
self.assert_exact_text("Products", "span.title")
self.click('button[name*="backpack"]')
self.click("#shopping_cart_container a")
self.assert_exact_text("Your Cart", "span.title")
self.assert_text("Backpack", "div.cart_item")
self.click("button#checkout")
self.type("#first-name", "SeleniumBase")
self.type("#last-name", "Automation")
self.type("#postal-code", "77123")
self.click("input#continue")
self.assert_text("Checkout: Overview")
self.assert_text("Backpack", "div.cart_item")
self.assert_text("29.99", "div.inventory_item_price")
self.click("button#finish")
self.assert_exact_text("Thank you for your order!", "h2")
self.assert_element('img[alt="Pony Express"]')
self.js_click("a#logout_sidebar_link")
self.assert_element("div#login_button_container")
```
* By default, **[CSS Selectors](https://www.w3schools.com/cssref/css_selectors.asp)** are used for finding page elements.
* If you're new to CSS Selectors, games like [CSS Diner](http://flukeout.github.io/) can help you learn.
* For more reading, [here's an advanced guide on CSS attribute selectors](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors).
<a id="common_methods"></a>
<h3><img src="https://seleniumbase.github.io/img/logo7.png" title="SeleniumBase" width="32" /> Here are some common SeleniumBase methods:</h3>
```python
self.open(url) # Navigate the browser window to the URL.
self.type(selector, text) # Update the field with the text.
self.click(selector) # Click the element with the selector.
self.click_link(link_text) # Click the link containing text.
self.go_back() # Navigate back to the previous URL.
self.select_option_by_text(dropdown_selector, option)
self.hover_and_click(hover_selector, click_selector)
self.drag_and_drop(drag_selector, drop_selector)
self.get_text(selector) # Get the text from the element.
self.get_current_url() # Get the URL of the current page.
self.get_page_source() # Get the HTML of the current page.
self.get_attribute(selector, attribute) # Get element attribute.
self.get_title() # Get the title of the current page.
self.switch_to_frame(frame) # Switch into the iframe container.
self.switch_to_default_content() # Leave the iframe container.
self.open_new_window() # Open a new window in the same browser.
self.switch_to_window(window) # Switch to the browser window.
self.switch_to_default_window() # Switch to the original window.
self.get_new_driver(OPTIONS) # Open a new driver with OPTIONS.
self.switch_to_driver(driver) # Switch to the browser driver.
self.switch_to_default_driver() # Switch to the original driver.
self.wait_for_element(selector) # Wait until element is visible.
self.is_element_visible(selector) # Return element visibility.
self.is_text_visible(text, selector) # Return text visibility.
self.sleep(seconds) # Do nothing for the given amount of time.
self.save_screenshot(name) # Save a screenshot in .png format.
self.assert_element(selector) # Verify the element is visible.
self.assert_text(text, selector) # Verify text in the element.
self.assert_exact_text(text, selector) # Verify text is exact.
self.assert_title(title) # Verify the title of the web page.
self.assert_downloaded_file(file) # Verify file was downloaded.
self.assert_no_404_errors() # Verify there are no broken links.
self.assert_no_js_errors() # Verify there are no JS errors.
```
🔵 For the complete list of SeleniumBase methods, see: <b><a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/method_summary.md">Method Summary</a></b>
<a id="fun_facts"></a>
<h2><img src="https://seleniumbase.github.io/img/logo7.png" title="SeleniumBase" width="32" /> Fun Facts / Learn More:</h2>
<p>✅ SeleniumBase automatically handles common <a href="https://www.selenium.dev/documentation/webdriver/" target="_blank">WebDriver</a> actions such as launching web browsers before tests, saving screenshots during failures, and closing web browsers after tests.</p>
<p>✅ SeleniumBase lets you customize tests via <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/customizing_test_runs.md">command-line options</a>.</p>
<p>✅ SeleniumBase uses simple syntax for commands. Example:</p>
```python
self.type("input", "dogs\n") # (The "\n" presses ENTER)
```
Most SeleniumBase scripts can be run with <code translate="no">pytest</code>, <code translate="no">pynose</code>, or pure <code translate="no">python</code>. Not all test runners can run all test formats. For example, tests that use the ``sb`` pytest fixture can only be run with ``pytest``. (See <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md">Syntax Formats</a>) There's also a <a href="https://behave.readthedocs.io/en/stable/gherkin.html#features" target="_blank">Gherkin</a> test format that runs with <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/behave_bdd/ReadMe.md">behave</a>.
```bash
pytest coffee_cart_tests.py --rs
pytest test_sb_fixture.py --demo
pytest test_suite.py --rs --html=report.html --dashboard
pynose basic_test.py --mobile
pynose test_suite.py --headless --report --show-report
python raw_sb.py
python raw_test_scripts.py
behave realworld.feature
behave calculator.feature -D rs -D dashboard
```
<p>✅ <code translate="no">pytest</code> includes automatic test discovery. If you don't specify a specific file or folder to run, <code translate="no">pytest</code> will automatically search through all subdirectories for tests to run based on the following criteria:</p>
* Python files that start with ``test_`` or end with ``_test.py``.
* Python methods that start with ``test_``.
With a SeleniumBase [pytest.ini](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/pytest.ini) file present, you can modify default discovery settings. The Python class name can be anything because ``seleniumbase.BaseCase`` inherits ``unittest.TestCase`` to trigger autodiscovery.
<p>✅ You can do a pre-flight check to see which tests would get discovered by <code translate="no">pytest</code> before the actual run:</p>
```bash
pytest --co -q
```
<p>✅ You can be more specific when calling <code translate="no">pytest</code> or <code translate="no">pynose</code> on a file:</p>
```bash
pytest [FILE_NAME.py]::[CLASS_NAME]::[METHOD_NAME]
pynose [FILE_NAME.py]:[CLASS_NAME].[METHOD_NAME]
```
<p>✅ No More Flaky Tests! SeleniumBase methods automatically wait for page elements to finish loading before interacting with them (<i>up to a timeout limit</i>). This means <b>you no longer need random <span><code translate="no">time.sleep()</code></span> statements</b> in your scripts.</p>
<img src="https://img.shields.io/badge/Flaky%20Tests%3F-%20NO%21-11BBDD.svg" alt="NO MORE FLAKY TESTS!" />
✅ SeleniumBase supports all major browsers and operating systems:
<p><b>Browsers:</b> Chrome, Edge, Firefox, and Safari.</p>
<p><b>Systems:</b> Linux/Ubuntu, macOS, and Windows.</p>
✅ SeleniumBase works on all popular CI/CD platforms:
<p><a href="https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/github/workflows/ReadMe.md"><img alt="GitHub Actions integration" src="https://img.shields.io/badge/GitHub_Actions-12B2C2.svg?logo=GitHubActions&logoColor=CFFFC2" /></a> <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/azure/jenkins/ReadMe.md"><img alt="Jenkins integration" src="https://img.shields.io/badge/Jenkins-32B242.svg?logo=jenkins&logoColor=white" /></a> <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/azure/azure_pipelines/ReadMe.md"><img alt="Azure integration" src="https://img.shields.io/badge/Azure-2288EE.svg?logo=AzurePipelines&logoColor=white" /></a> <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/google_cloud/ReadMe.md"><img alt="Google Cloud integration" src="https://img.shields.io/badge/Google_Cloud-11CAE8.svg?logo=GoogleCloud&logoColor=EE0066" /></a> <a href="#utilizing_advanced_features"><img alt="AWS integration" src="https://img.shields.io/badge/AWS-4488DD.svg?logo=AmazonAWS&logoColor=FFFF44" /></a> <a href="https://en.wikipedia.org/wiki/Personal_computer" target="_blank"><img alt="Your Computer" src="https://img.shields.io/badge/💻_Your_Computer-44E6E6.svg" /></a></p>
<p>✅ SeleniumBase includes an automated/manual hybrid solution called <b><a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/master_qa/ReadMe.md">MasterQA</a></b> to speed up manual testing with automation while manual testers handle validation.</p>
<p>✅ SeleniumBase supports <a href="https://github.com/seleniumbase/SeleniumBase/tree/master/examples/offline_examples">running tests while offline</a> (<i>assuming webdrivers have previously been downloaded when online</i>).</p>
<p>✅ For a full list of SeleniumBase features, <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/features_list.md">Click Here</a>.</p>
<a id="demo_mode_and_debugging"></a>
<h2><img src="https://seleniumbase.github.io/img/logo7.png" title="SeleniumBase" width="32" /> Demo Mode / Debugging:</h2>
🔵 <b>Demo Mode</b> helps you see what a test is doing. If a test is moving too fast for your eyes, run it in <b>Demo Mode</b> to pause the browser briefly between actions, highlight page elements being acted on, and display assertions:
```bash
pytest my_first_test.py --demo
```
🔵 ``time.sleep(seconds)`` can be used to make a test wait at a specific spot:
```python
import time; time.sleep(3) # Do nothing for 3 seconds.
```
🔵 **Debug Mode** with Python's built-in **[pdb](https://docs.python.org/3/library/pdb.html)** library helps you debug tests:
```python
import pdb; pdb.set_trace()
import pytest; pytest.set_trace()
breakpoint() # Shortcut for "import pdb; pdb.set_trace()"
```
> (**``pdb``** commands: ``n``, ``c``, ``s``, ``u``, ``d`` => ``next``, ``continue``, ``step``, ``up``, ``down``)
🔵 To pause an active test that throws an exception or error, (*and keep the browser window open while **Debug Mode** begins in the console*), add **``--pdb``** as a ``pytest`` option:
```bash
pytest test_fail.py --pdb
```
🔵 To start tests in Debug Mode, add **``--trace``** as a ``pytest`` option:
```bash
pytest test_coffee_cart.py --trace
```
<a href="https://github.com/mdmintz/pdbp"><img src="https://seleniumbase.github.io/cdn/gif/coffee_pdbp.gif" alt="SeleniumBase test with the pdbp (Pdb+) debugger" title="SeleniumBase test with the pdbp (Pdb+) debugger" /></a>
<a id="command_line_options"></a>
<h2>🔵 Command-line Options:</h2>
<a id="pytest_options"></a>
✅ Here are some useful command-line options that come with <code translate="no">pytest</code>:
```bash
-v # Verbose mode. Prints the full name of each test and shows more details.
-q # Quiet mode. Print fewer details in the console output when running tests.
-x # Stop running the tests after the first failure is reached.
--html=report.html # Creates a detailed pytest-html report after tests finish.
--co | --collect-only # Show what tests would get run. (Without running them)
--co -q # (Both options together!) - Do a dry run with full test names shown.
-n=NUM # Multithread the tests using that many threads. (Speed up test runs!)
-s # See print statements. (Should be on by default with pytest.ini present.)
--junit-xml=report.xml # Creates a junit-xml report after tests finish.
--pdb # If a test fails, enter Post Mortem Debug Mode. (Don't use with CI!)
--trace # Enter Debug Mode at the beginning of each test. (Don't use with CI!)
-m=MARKER # Run tests with the specified pytest marker.
```
<a id="new_pytest_options"></a>
✅ SeleniumBase provides additional <code translate="no">pytest</code> command-line options for tests:
```bash
--browser=BROWSER # (The web browser to use. Default: "chrome".)
--chrome # (Shortcut for "--browser=chrome". On by default.)
--edge # (Shortcut for "--browser=edge".)
--firefox # (Shortcut for "--browser=firefox".)
--safari # (Shortcut for "--browser=safari".)
--settings-file=FILE # (Override default SeleniumBase settings.)
--env=ENV # (Set the test env. Access with "self.env" in tests.)
--account=STR # (Set account. Access with "self.account" in tests.)
--data=STRING # (Extra test data. Access with "self.data" in tests.)
--var1=STRING # (Extra test data. Access with "self.var1" in tests.)
--var2=STRING # (Extra test data. Access with "self.var2" in tests.)
--var3=STRING # (Extra test data. Access with "self.var3" in tests.)
--variables=DICT # (Extra test data. Access with "self.variables".)
--user-data-dir=DIR # (Set the Chrome user data directory to use.)
--protocol=PROTOCOL # (The Selenium Grid protocol: http|https.)
--server=SERVER # (The Selenium Grid server/IP used for tests.)
--port=PORT # (The Selenium Grid port used by the test server.)
--cap-file=FILE # (The web browser's desired capabilities to use.)
--cap-string=STRING # (The web browser's desired capabilities to use.)
--proxy=SERVER:PORT # (Connect to a proxy server:port as tests are running)
--proxy=USERNAME:PASSWORD@SERVER:PORT # (Use an authenticated proxy server)
--proxy-bypass-list=STRING # (";"-separated hosts to bypass, Eg "*.foo.com")
--proxy-pac-url=URL # (Connect to a proxy server using a PAC_URL.pac file.)
--proxy-pac-url=USERNAME:PASSWORD@URL # (Authenticated proxy with PAC URL.)
--proxy-driver # (If a driver download is needed, will use: --proxy=PROXY.)
--multi-proxy # (Allow multiple authenticated proxies when multi-threaded.)
--agent=STRING # (Modify the web browser's User-Agent string.)
--mobile # (Use the mobile device emulator while running tests.)
--metrics=STRING # (Set mobile metrics: "CSSWidth,CSSHeight,PixelRatio".)
--chromium-arg="ARG=N,ARG2" # (Set Chromium args, ","-separated, no spaces.)
--firefox-arg="ARG=N,ARG2" # (Set Firefox args, comma-separated, no spaces.)
--firefox-pref=SET # (Set a Firefox preference:value set, comma-separated.)
--extension-zip=ZIP # (Load a Chrome Extension .zip|.crx, comma-separated.)
--extension-dir=DIR # (Load a Chrome Extension directory, comma-separated.)
--disable-features="F1,F2" # (Disable features, comma-separated, no spaces.)
--binary-location=PATH # (Set path of the Chromium browser binary to use.)
--driver-version=VER # (Set the chromedriver or uc_driver version to use.)
--sjw # (Skip JS Waits for readyState to be "complete" or Angular to load.)
--wfa # (Wait for AngularJS to be done loading after specific web actions.)
--pls=PLS # (Set pageLoadStrategy on Chrome: "normal", "eager", or "none".)
--headless # (The default headless mode. Linux uses this mode by default.)
--headless1 # (Use Chrome's old headless mode. Fast, but has limitations.)
--headless2 # (Use Chrome' | text/markdown | Michael Mintz | mdmintz@gmail.com | Michael Mintz | null | MIT | null | [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Environment :: MacOS X",
"Environment :: Win32 (MS Windows)",
"Environment :: Web Environment",
"Framework :: Pytest",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Internet",
"Topic :: Scientific/Engineering",
"Topic :: Software Development",
"Topic :: Software Development :: Quality Assurance",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Testing",
"Topic :: Software Development :: Testing :: Acceptance",
"Topic :: Software Development :: Testing :: Traffic Generation",
"Topic :: Utilities"
] | [
"Windows"
] | https://github.com/seleniumbase/SeleniumBase | null | >=3.9 | [] | [] | [] | [
"seleniumbase>=4.47.0"
] | [] | [] | [] | [
"Homepage, https://github.com/seleniumbase/SeleniumBase",
"Changelog, https://github.com/seleniumbase/SeleniumBase/releases",
"Download, https://pypi.org/project/seleniumbase/#files",
"Blog, https://seleniumbase.com/",
"Discord, https://discord.gg/EdhQTn3EyE",
"PyPI, https://pypi.org/project/seleniumbase/",
"Source, https://github.com/seleniumbase/SeleniumBase",
"Repository, https://github.com/seleniumbase/SeleniumBase",
"Documentation, https://seleniumbase.io/"
] | twine/6.2.0 CPython/3.11.9 | 2026-02-20T18:57:44.280525 | selenium_base-4.47.0.tar.gz | 68,006 | e6/fe/4dcd8a75efc3b0859017614022b738f71eb44b48f9578d325126f0313ef6/selenium_base-4.47.0.tar.gz | source | sdist | null | false | 74379682a14b8393c914072c733e2aaa | 9c95e6903c5fc50dd0d41ad646abd63b175695559e06ab2c2c49733269ef1a6f | e6fe4dcd8a75efc3b0859017614022b738f71eb44b48f9578d325126f0313ef6 | null | [] | 194 |
2.2 | disortpp | 1.0.3 | DisORT++ — Discrete Ordinates Radiative Transfer solver | # DisORT++
A modern C++17 implementation of the DISORT (Discrete Ordinates Radiative
Transfer) algorithm. DisORT++ solves the radiative transfer equation in a
plane-parallel or pseudo-spherical atmosphere, computing fluxes, mean
intensities, and angular intensities at arbitrary optical depths and directions.
## Features
- Discrete-ordinate method with arbitrary even stream count
- Henyey-Greenstein, Rayleigh, and tabulated phase functions
- Delta-M and Delta-M+ scaling for forward-peaked scattering
- Thermal emission with Planck-function integration
- Lambertian and BRDF surface reflection (RPV, Cox-Munk, Ambrals, Hapke)
- Plane-parallel and pseudo-spherical beam geometry
- Nakajima-Tanaka and Buras-Emde intensity corrections
- OpenMP-parallelised spectral loop functions for multi-wavenumber calculations
- Python bindings via pybind11
## Two solver interfaces
| | DisortSolver | DisortFluxSolver |
|---|---|---|
| Output | Fluxes + intensities | Fluxes only |
| Surface | Lambertian + BRDF | Lambertian |
| Streams | Any even number >= 4 | 4, 6, 8, 10, 12, 14, 16, 32, 64 |
| Performance | Baseline | 30-50% faster |
## Installation
### From PyPI
```bash
pip install disortpp
```
### From source (Python module)
```bash
git clone https://github.com/NewStrangeWorlds/DisORT.git
cd DisORT
pip install .
```
### From source (C++ library only)
```bash
cd DisORT
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j$(nproc)
```
Dependencies (Eigen 3.4, pybind11) are fetched automatically via CMake
FetchContent.
## Quick start (Python)
```python
import disortpp
import numpy as np
nlyr = 4
nstr = 16
cfg = disortpp.DisortConfig(nlyr, nstr)
cfg.flags.use_lambertian_surface = True
cfg.flags.comp_only_fluxes = True
cfg.allocate()
cfg.delta_tau = [0.1, 0.5, 1.0, 2.0]
cfg.single_scat_albedo = [0.9, 0.9, 0.9, 0.9]
cfg.set_henyey_greenstein(g=0.8)
cfg.bc.direct_beam_flux = np.pi
cfg.bc.direct_beam_mu = 0.5
cfg.bc.surface_albedo = 0.1
solver = disortpp.DisortSolver()
result = solver.solve(cfg)
flux_up = np.array(result.flux_up)
print(f"Upward flux at TOA: {flux_up[0]:.6f}")
```
### Spectral loops
Solve many wavenumber bands efficiently in a single C++ call with OpenMP
parallelisation:
```python
bands = [(100.0, 200.0), (200.0, 300.0), (300.0, 400.0)]
results = disortpp.solve_spectral_bands(cfg, bands)
flux_spectrum = np.array([r.flux_up[0] for r in results])
```
## Quick start (C++)
```cpp
#include "DisortConfig.hpp"
#include "DisortSolver.hpp"
using namespace disortpp;
int main() {
DisortConfig cfg(4, 16);
cfg.flags.use_lambertian_surface = true;
cfg.flags.comp_only_fluxes = true;
cfg.allocate();
cfg.delta_tau = {0.1, 0.5, 1.0, 2.0};
cfg.single_scat_albedo = {0.9, 0.9, 0.9, 0.9};
cfg.setHenyeyGreenstein(0.8);
cfg.bc.direct_beam_flux = 3.14159;
cfg.bc.direct_beam_mu = 0.5;
cfg.bc.surface_albedo = 0.1;
DisortSolver solver;
DisortResult result = solver.solve(cfg);
double flux_up_toa = result.flux_up[0];
}
```
## CMake build options
| Option | Default | Description |
|---|---|---|
| `CMAKE_BUILD_TYPE` | `Release` | `Release` (`-O3`) or `Debug` (`-g -Wall`) |
| `BUILD_PYTHON_BINDINGS` | `OFF` | Build the `disortpp` Python module |
| `DISORTPP_MARCH_NATIVE` | `ON` | Use `-march=native` (disable for portable binaries) |
## Running the tests
```bash
cd build
ctest --output-on-failure
```
## License
GNU General Public License v3 (GPLv3). See [LICENSE](LICENSE) for details.
| text/markdown | Daniel Kitzmann | null | null | null | GPL-3.0-or-later | null | [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Scientific/Engineering :: Astronomy",
"Programming Language :: C++",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows"
] | [] | null | null | >=3.9 | [] | [] | [] | [
"numpy"
] | [] | [] | [] | [
"Repository, https://github.com/NewStrangeWorlds/DisORT"
] | twine/6.1.0 CPython/3.13.7 | 2026-02-20T18:57:33.615487 | disortpp-1.0.3.tar.gz | 152,000 | 15/38/9bc281f32de2f6d15edfe6c5058a21ae9e3caec59e4c7690a0eaabf51e10/disortpp-1.0.3.tar.gz | source | sdist | null | false | 543531e318ec0d32ad7184b4e6588e25 | 135ad7558a0483384412edb8cf60f390ba12d6881381c6339da58d90637406cb | 15389bc281f32de2f6d15edfe6c5058a21ae9e3caec59e4c7690a0eaabf51e10 | null | [] | 1,434 |
2.4 | gs-quant | 1.5.2 | Goldman Sachs Quant | GS Quant is a Python toolkit for quantitative finance, which provides access to an extensive set of derivatives pricing data through the Goldman Sachs Marquee developer APIs. Libraries are provided for timeseries analytics, portfolio manipulation, risk and scenario analytics and backtesting. Can be used to interact with the Marquee platform programmatically, or as a standalone software package for quantitiative analytics.
Created and maintained by quantitative developers (quants) at Goldman Sachs to enable development of trading strategies and analysis of derivative products. Can be used to facilitate derivative structuring and trading, or as statistical packages for a variety of timeseries analytics applications.
# Overview
GS Quant is a Python toolkit for quantitative finance, which provides access to an extensive set of derivatives pricing data through the Goldman Sachs Marquee developer APIs.
# Important Links
- [GS Developer](https://developer.gs.com/docs/gsquant/)
- [PyPI](https://pypi.org/project/gs-quant/)
- [gs_quant_internal](https://gitlab.gs.com/marquee/analytics/gs_quant_internal)
## Set up
- [Getting Started](https://confluence.apg.services.gs.com/display/TECHPY/Getting+started+with+Python+in+GS)
- [Git Setup](./docs/developer-setup.md)
- [Marquee Gitflow](https://gitlab.gs.com/marquee/ui-platform/sdlc/blob/develop/docs/developer-setup.md#marquee-gitflow)
### Code formatting
We are now using [ruff](https://github.com/astral-sh/ruff) for very fast code formatting. The easiest thing to do it to use the pre-commit hooks.
That way when you commit it will automatically format and fix your code.
```bash
# If you DIDN't use uv to setup your env you might need to install ruff and pre-commit manually.
pip install ruff pre-commit
```
Installs the pre-commit hooks, this will make ruff run on every commit.
```bash
pre-commit install
```
Alternatively you can run the ruff commands locally, `check` runs lint style check for code issues and `--fix` will fix them. `format` is about the code style, whitespace etc.
```bash
ruff check --fix
ruff format
```
## Build / Test / Develop
- Install development dependencies (see extras_require in setup.py).
- Check out the project.
- Navigate to project root.
- Consider installing it in [development mode](https://setuptools.readthedocs.io/en/latest/setuptools.html#development-mode).
To build distribution package:
- `python setup.py sdist`
- Package will be created in the dist/ folder.
To run tests:
- `pytest gs_quant/test`
# Contacts
- Symphony room: gs_quant
- Distribution list: gs-quant@gs.com
| text/markdown | null | Goldman Sachs <developer@gs.com> | null | null | Apache-2.0 | null | [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Operating System :: OS Independent",
"License :: OSI Approved :: Apache Software License"
] | [] | null | null | >=3.9 | [] | [] | [] | [
"aenum",
"backoff",
"backports.zoneinfo; python_version < \"3.9\"",
"cachetools",
"certifi",
"dataclasses_json",
"deprecation",
"inflection",
"lmfit",
"more_itertools",
"msgpack",
"nest-asyncio",
"numpy<2.4.0,>1.17.0",
"opentelemetry-api",
"opentelemetry-sdk",
"pandas>=1.4",
"pydash<7.0.0",
"python-dateutil>=2.7.0",
"requests",
"httpx>=0.28.1",
"scipy>=1.2.0",
"statsmodels>=0.13.0",
"tqdm",
"websockets",
"quant-extensions; extra == \"turbo\"",
"jupyter; extra == \"notebook\"",
"matplotlib; extra == \"notebook\"",
"seaborn; extra == \"notebook\"",
"treelib; extra == \"notebook\"",
"pytest; extra == \"test\"",
"pytest-cov; extra == \"test\"",
"pytest-mock; extra == \"test\"",
"pytest-order; extra == \"test\"",
"pytest-asyncio; extra == \"test\"",
"testfixtures; extra == \"test\"",
"nbconvert; extra == \"test\"",
"nbformat; extra == \"test\"",
"plotly; extra == \"test\"",
"freezegun; extra == \"test\"",
"ruff; extra == \"test\"",
"wheel; extra == \"develop\"",
"sphinx; extra == \"develop\"",
"sphinx_rtd_theme; extra == \"develop\"",
"sphinx_autodoc_typehints; extra == \"develop\"",
"pytest; extra == \"develop\"",
"pytest-cov; extra == \"develop\"",
"pytest-mock; extra == \"develop\"",
"pytest-order; extra == \"develop\"",
"testfixtures; extra == \"develop\""
] | [] | [] | [] | [
"Homepage, https://marquee.gs.com"
] | twine/6.2.0 CPython/3.10.19 | 2026-02-20T18:57:25.994733 | gs_quant-1.5.2.tar.gz | 897,950 | 1a/f7/53f28231047343bd984fbed559af38593c27cd5fc71dfeb162c1e4dc6e16/gs_quant-1.5.2.tar.gz | source | sdist | null | false | ef1d5f4efa76081354ea6ec373c37c5e | 9495c9812a6619c746d000db80e253f037f09b40a3ec48d83b0cc5baac34c7e2 | 1af753f28231047343bd984fbed559af38593c27cd5fc71dfeb162c1e4dc6e16 | null | [
"LICENSE",
"NOTICE",
"NOTICE.txt"
] | 2,132 |
2.4 | skema-kelp | 0.2.0 | Satellite-based kelp classification from Sentinel-2 using semantic segmentation | # SKeMa
[](https://doi.org/10.57967/hf/6790)
[](https://huggingface.co/m5ghanba/SKeMa)
[](https://pypi.org/project/skema-kelp/)
[](https://opensource.org/licenses/MIT)
[](https://creativecommons.org/licenses/by/4.0/)
**Satellite-based Kelp Mapping using Semantic Segmentation on Sentinel-2 imagery**
`skema` is a Python tool for classifying kelp in Sentinel-2 satellite images using a deep learning segmentation model (PyTorch). It provides a command-line interface (CLI) for easy, reproducible inference. To run the tool you would need to download Sentinel-2 images from the Copernicus Browser. More detailed instruction on how to download these images can be found in Section Usage. The following instructions are provided for anyone with no knowledge of what a command line is, no knowledge of Python or virtual environments, etc. Just follow along step by step.
**Model available on Hugging Face**: [m5ghanba/SKeMa](https://huggingface.co/m5ghanba/SKeMa)
**DOI**: [10.57967/hf/6790](https://doi.org/10.57967/hf/6790)
---
## Table of Contents
- [Quick Start (Experienced Users)](#-quick-start-experienced-users)
- [Citation](#citation)
- [Installation](#-installation)
- [Step 1: Install Python](#step-1-install-python)
- [Step 2: Install SKeMa](#step-2-install-skema)
- [Static Files](#static-files)
- [GPU Support](#gpu-support)
- [Usage](#️-usage)
- [Activating the Virtual Environment](#activating-the-virtual-environment)
- [Downloading Sentinel-2 Images](#downloading-sentinel-2-images)
- [Running SKeMa](#running-skema)
- [Model Types](#model-types)
- [Output Files](#output-files)
- [Project Structure](#️-project-structure)
- [License](#-license)
---
## ⚡ Quick Start (Experienced Users)
```bash
pip install skema-kelp
# Download static files (for model_full only) from sources listed below
# Download Sentinel-2 imagery from https://dataspace.copernicus.eu/browser/
skema --input-dir "path/to/S2_scene.SAFE" --output-filename output.tif
# For help and all options
skema --help
```
**For detailed installation instructions (beginner-friendly), see [Installation](#-installation) below.**
---
## Citation
If you use **SKeMa** in your research or work, please cite:
```bibtex
@software{skema_2025,
author = {Mohsen Ghanbari, Neil Ernst, Taylor A. Denouden, Luba Y. Reshitnyk, Piper Steffen, Alena Wachmann, Alejandra Mora-Sotoa, Eduardo Loos, Margot Hessing-Lewis, Nic Dedeluke, Maycira Costa},
title = {SKeMa: Satellite-based Kelp Mapping using Semantic Segmentation on Sentinel-2 imagery},
year = 2026,
publisher = {Hugging Face},
doi = {10.57967/hf/6790},
url = {https://huggingface.co/m5ghanba/SKeMa}
}
```
---
## 🚀 Installation
Before you can set up SKeMa, you'll need **Python** (version **3.8 to 3.12**) installed on your computer. Python is a free tool, and no accounts or sign-ups are required to install it. We'll install it using your terminal (command line) where possible for simplicity. If you're on Windows, ensure you're using **PowerShell** or **Command Prompt** as Administrator (right-click and select "Run as administrator") for some steps.
### Step 1: Install Python
**Checking Your Current Python Version:**
Before proceeding, check if you already have Python between versions 3.8 and 3.12 on your computer.
Open a terminal (PowerShell, Command Prompt, or macOS/Linux terminal).
Run:
```
python --version
```
or, on macOS/Linux, try:
```
python3 --version
```
If the version shown is between 3.8 and 3.12 (e.g., Python 3.9.13, Python 3.11.5, Python 3.12.7), you already meet the requirement and can skip the installation steps below. Otherwise, follow the instructions below to install Python.
#### On Windows
1. **Check if Winget is available** (it's built into Windows 10 version 2009 or later, or Windows 11, and most modern systems have it):
- Open PowerShell or Command Prompt.
- Type `winget --version` and press Enter.
- If it shows a version number (e.g., "v1.8.0"), proceed. If not (error like "winget is not recognized"), download the App Installer from the Microsoft Store (search for "App Installer") or update Windows via Settings > Update & Security > Windows Update.
2. **Install Python 3.12.7** (the most reliable and stable subversion of Python 3.12):
- In your terminal, run:
```
winget install -e --id Python.Python.3.12
```
- This downloads and installs Python automatically. It may take a few minutes.
- **Important**: During installation (if prompted), ensure "Add Python to PATH" is selected (it usually is by default with winget).
- Restart your terminal after installation.
- Verify: Run `python --version`. It should output something like "Python 3.12.7". If not, close and reopen the terminal, or manually add Python to PATH (search online for "add Python to PATH Windows").
*Alternative if winget fails*: Download the installer directly from the Python website:
- For Python 3.12.7: [https://www.python.org/ftp/python/3.12.7/python-3.12.7-amd64.exe](https://www.python.org/ftp/python/3.12.7/python-3.12.7-amd64.exe)
- Run the downloaded installer.
- **IMPORTANT**: During installation, make sure to check the box that says **"Add Python to PATH"** at the beginning of the installation process. This option is **unchecked by default**, so you must manually select it.
- Follow the GUI prompts to complete the installation.
- Verify: Run `python --version` in a new terminal window. It should output "Python 3.12.7".
#### On macOS
1. **Install Homebrew** (a package manager for CLI installations, if you don't have it):
- Open Terminal (search for it in Spotlight with Cmd+Space).
- Run:
```
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```
- Follow any on-screen prompts (it may ask for your password; this is normal). No account needed.
- After installation, run the commands it suggests to add Homebrew to your PATH (e.g., `echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile` and then `eval "$(/opt/homebrew/bin/brew shellenv)"`).
- Verify: Run `brew --version`. It should show a version like "4.3.0".
2. **Install Python 3.12**:
- Run:
```
brew install python@3.12
```
- This installs Python and adds it to PATH.
- Verify: Run `python3 --version` (note: use `python3` on macOS). It should output "Python 3.12.7".
*Alternative*: Download the official installer from [python.org](https://www.python.org/downloads/macos/) using your browser, run it, and follow GUI steps. **Make sure Python is added to your PATH during installation.**
#### On Linux (e.g., Ubuntu/Debian; adjust for other distros like Fedora)
1. **Update your package list**:
- Open your terminal.
- Run:
```
sudo apt update
```
- Enter your password when prompted (sudo is for admin privileges; no account needed beyond your user login).
2. **Install Python 3.12**:
- Run:
```
sudo apt install python3.12 python3.12-venv python3-pip
```
- This installs Python, the venv module, and pip.
- Verify: Run `python3 --version`. It should output "Python 3.12.x".
- *For Fedora/RHEL*: Use `sudo dnf install python3.12` instead.
*Note*: If your distro's repositories don't have Python 3.12, add a PPA (e.g., for Ubuntu: `sudo add-apt-repository ppa:deadsnakes/ppa` then update and install).
Once Python is installed and verified, proceed to the next section. If you encounter errors (e.g., "command not found"), search online for the exact error message + your OS.
### Step 2: Install SKeMa
Open your **terminal**:
- On **Windows**, you can use Command Prompt or PowerShell.
- On **macOS**, open the Terminal app.
- On **Linux**, open your terminal emulator of choice.
When you open a terminal, you start inside a **directory (folder)**. You can move to another directory with the command `cd`. For example:
```
cd C:\Users\YourName\Documents
```
On macOS/Linux:
```
cd /Users/yourname/Documents
```
👉 The easiest way to navigate is to open your file explorer, go to the folder you want, then copy its full path and paste it after `cd` on the command line. For more details, look up "basic terminal navigation" online.
Now, navigate to a directory where you want to work with SKeMa, then run:
#### Option 1: Install with pip (Recommended)
```bash
# Create a virtual environment
python -m venv skema_env
# Activate the virtual environment
# On Windows:
skema_env\Scripts\activate
# On macOS/Linux:
source skema_env/bin/activate
# Install SKeMa
pip install skema-kelp
```
#### Option 2: Install from source (for developers)
If you want to modify the code or contribute to development:
```bash
# Install Git first (see system-specific instructions below)
# Then clone the repository
git clone https://github.com/m5ghanba/skema.git
cd skema
# Create and activate virtual environment
python -m venv skema_env
# On Windows:
skema_env\Scripts\activate
# On macOS/Linux:
source skema_env/bin/activate
# Install in development mode
pip install -e .
```
**Installing Git (only needed for Option 2):**
- **Windows**: `winget install --id Git.Git -e --source winget` or download from [git-scm.com](https://git-scm.com/download/win)
- **macOS**: `brew install git` or download from [git-scm.com](https://git-scm.com/download/mac)
- **Linux**: `sudo apt install git` (Ubuntu/Debian) or `sudo dnf install git` (Fedora/RHEL)
Each line explained:
- `python -m venv skema_env`: Creates a virtual environment named `skema_env` to isolate project dependencies.
- `skema_env\Scripts\activate` (Windows) or `source skema_env/bin/activate` (macOS/Linux): Activates the virtual environment, ensuring subsequent commands use its isolated Python and packages.
- `pip install skema-kelp`: Installs SKeMa and all its dependencies from PyPI.
If you encounter packaging errors, make sure your pip and build tools are up to date:
```bash
pip install --upgrade pip setuptools wheel
```
### Static files
There are necessary **static files** that need to be manually downloaded and placed inside the corresponding directory as described below. These are bathymetry and substrate files from the whole coast of British Columbia that `skema` uses when predicting kelp on a Sentinel-2 image.
- The bathymetry file is a single TIFF raster (`Bathymetry_10m.tif`).
- There are five substrate TIFF rasters (`NCC_substrate_20m.tif`, `SOG_substrate_20m.tif`, `WCVI_substrate_20m.tif`, `QCS_substrate_20m.tif`, `HG_substrate_20m.tif`), each covering a different region of the BC coast.
When SKeMa is installed via `pip`, there is a folder named `bathy_substrate` located in the following directory. Place all six static files inside this folder:
On Windows:
```
skema_env\Lib\site-packages\skema\static\bathy_substrate
```
On macOS/Linux:
```
skema_env/lib/python3.11/site-packages/skema/static/bathy_substrate/
```
(Adjust the Python version number and virtual-environment name as appropriate for your system.)
**⚠️ Note**: Static files (bathymetry and substrate) are only required when using the **full model** (`--model-type model_full`). If you plan to use only the **S2-only model** (`--model-type model_s2bandsandindices_only`), you can skip downloading these files.
If you installed `skema` by cloning the **GitHub repository** instead of using `pip`, please place the downloaded files inside:
```
skema/static/bathy_substrate/
```
**Sources**:
- Canada's DEM/bathymetry model (10m resolution):
- Documentation: https://publications.gc.ca/collections/collection_2023/rncan-nrcan/m183-2/M183-2-8963-eng.pdf
- Dataset: https://maps-cartes.services.geo.ca/server_serveur/rest/services/NRCan/canada_west_coast_DEM_en/MapServer
- Shallow substrate model (20m) of the Pacific Canadian coast (Haggarty et al., 2020):
https://osdp-psdo.canada.ca/dp/en/search/metadata/NRCAN-FGP-1-b100cf6c-7818-4748-9960-9eab2aa6a7a0
If you encounter any issues downloading these files, please don't hesitate to contact us for assistance.
### GPU support
For GPU users, install CUDA-supported PyTorch that matches your CUDA Toolkit. Check your CUDA version with:
```bash
nvcc --version
```
For CUDA 12.1:
```bash
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
```
For CUDA 11.8:
```bash
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
```
This will install the latest compatible versions of PyTorch, torchvision, and torchaudio for your CUDA version.
Skip this step if you don't have a GPU.
---
## 🛰️ Usage
### Activating the Virtual Environment
To use SKeMa after the initial installation, you must activate its virtual environment each time you start a new session (if you created one). Follow these steps each time you want to run the tool:
1. **Open a terminal** (Command Prompt, PowerShell, or Terminal).
2. **Navigate to the directory** where you created the virtual environment:
- **On Windows:**
```
cd path\to\your\directory
```
- **On macOS/Linux:**
```
cd path/to/your/directory
```
3. **Activate the virtual environment:**
- **On Windows:**
```
skema_env\Scripts\activate
```
- **On macOS/Linux:**
```
source skema_env/bin/activate
```
4. **Run SKeMa** using the commands described below.
If your command line prompt shows `(skema_env)`, the virtual environment is activated and you're ready to proceed.
### Downloading Sentinel-2 Images
SKeMa uses Sentinel-2 satellite images, which can be downloaded from the [Copernicus Browser](https://dataspace.copernicus.eu/browser/). You will need a free account to access and download these images, which are provided as `.zip` files.
#### Sentinel-2 Image Download Instructions
Follow these steps to download Sentinel-2 images:
1. **Go to the Copernicus Browser**: Navigate to [https://browser.dataspace.copernicus.eu/](https://browser.dataspace.copernicus.eu/)
2. **Register**: If you haven't already, create a free account by clicking on the "Register" option.
3. **Sign in**: Log in to your account using your credentials.
4. **Create an area of interest**: Click on the top right option **"Create an area of interest"** (the pentagon shape icon).

5. **Draw your polygon**: Click on the option **"Draw polygon of interest..."** (the pencil shape icon).

6. **Define your area**: Draw a polygon around your area of interest by clicking on the map to create points. Close the polygon by clicking on the first point you placed.

7. **Set parameters and search**:
- Select the **Time Range** option and set the dates in the **"From"** and **"Until"** fields.
- Optionally, set the **cloud coverage** filter.
- Click on **"Find products within selected time range"**.
- Verify that **Sentinel-2 L2A** is selected as the data level (default setting).

8. **Choose your Sentinel-2 scene**: From the map, select the desired Sentinel-2 scene by clicking on it.

9. **Preview and download**:
- Click on the **"i"** option to view a preview of the image and quick information.
- Click on the **download icon** (located at the bottom right) to download the scene.

### Running SKeMa
Now, you can run SKeMa on a new Sentinel-2 image:
```bash
skema --input-dir "path/to/sentinel2/safe/folder" --output-filename output.tif
```
- The first path (`--input-dir`) must be the full path to the `.SAFE` folder.
- Sentinel-2 images from the Copernicus Browser come as `.zip` files. Extract them first.
- Then, pass the full path to the `.SAFE` folder (e.g., `"C:\...\S2C_MSIL2A_20250715T194921_N0511_R085_T09UUU_20250716T001356.SAFE"`).
- **Note**: If your path or output filename contains spaces, enclose it in double quotation marks (as shown in the example).
- The second parameter (`--output-filename`) is the name of the output file (e.g., `output.tif`). You only need to provide the filename, not the full directory path. The output will be saved in a folder created alongside the `.SAFE` folder.
### Model Types
SKeMa supports two model types:
1. **`model_full`** (default): Uses all available data including Sentinel-2 bands, bathymetry, and substrate information. This model provides the most accurate predictions but requires bathymetry and substrate static files.
2. **`model_s2bandsandindices_only`**: Uses only Sentinel-2 bands and derived spectral indices. This model does not require bathymetry or substrate files, making it suitable for areas outside British Columbia or when static files are unavailable.
To specify the model type, use the `--model-type` flag:
**Note**: Scroll right to see the complete command if it extends beyond your screen.
```bash
# Using the full model (default - includes bathymetry and substrate)
skema --input-dir "path/to/sentinel2/safe/folder" --output-filename output.tif --model-type model_full
# Using S2-only model (no bathymetry/substrate required)
skema --input-dir "path/to/sentinel2/safe/folder" --output-filename output.tif --model-type model_s2bandsandindices_only
```
If `--model-type` is not specified, the tool defaults to `model_full`.
### Output Files
After running, the tool generates a folder with the same name as the `.SAFE` file. Inside this folder, you'll find:
**For `model_full`:**
1. **`<SAFE_name>_B2B3B4B8.tif`**: a 10 m resolution, 4-band GeoTIFF containing Sentinel-2 bands B02 (Blue), B03 (Green), B04 (Red), and B08 (Near-Infrared).
2. **`<SAFE_name>_B5B6B7B8A_B11B12.tif`**: a 20 m resolution, 6-band GeoTIFF containing Sentinel-2 bands B05, B06, B07, B8A, B11, and B12.
3. **`<SAFE_name>_Bathymetry.tif`**: bathymetry data aligned and warped to the Sentinel-2 pixel grid.
4. **`<SAFE_name>_Substrate.tif`**: substrate classification data aligned and warped to the Sentinel-2 pixel grid.
5. **`output.tif`** (or the filename you specify): a **binary GeoTIFF**, where kelp is labeled as `1` and non-kelp as `0`.
**For `model_s2bandsandindices_only`:**
1. **`<SAFE_name>_B2B3B4B8.tif`**: a 10 m resolution, 4-band GeoTIFF containing Sentinel-2 bands B02 (Blue), B03 (Green), B04 (Red), and B08 (Near-Infrared).
2. **`<SAFE_name>_B5B6B7B8A_B11B12.tif`**: a 20 m resolution, 6-band GeoTIFF containing Sentinel-2 bands B05, B06, B07, B8A, B11, and B12.
3. **`output.tif`** (or the filename you specify): a **binary GeoTIFF**, where kelp is labeled as `1` and non-kelp as `0`.
---
## ⚙️ Project Structure
```text
skema/
├── skema/
│ ├── cli.py
│ ├── lib.py
│ ├── __init__.py
│ │
│ └── static/
│ ├── __init__.py
│ │
│ └── bathy_substrate/
│ ├── __init__.py
│ ├── Bathymetry_10m.tif
│ ├── NCC_substrate_20m.tif
│ ├── SOG_substrate_20m.tif
│ ├── WCVI_substrate_20m.tif
│ ├── QCS_substrate_20m.tif
│ └── HG_substrate_20m.tif
├── pyproject.toml
├── setup.py
├── requirements.txt
├── README.md
```
---
## 📜 License
- **Code**: MIT License (see LICENSE file)
- **Model**: The trained model is licensed under **CC-BY-4.0** — please cite the DOI when using it.
| text/markdown | null | Mohsen Ghanbari <mohsenghanbari@uvic.ca> | null | null | MIT | kelp, sentinel-2, semantic-segmentation, remote-sensing, satellite-imagery, deep-learning, pytorch | [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Image Recognition",
"Topic :: Scientific/Engineering :: GIS",
"Topic :: Scientific/Engineering :: Artificial Intelligence"
] | [] | null | null | <3.13,>=3.8 | [] | [] | [] | [
"albumentations<2,>=1.3",
"click<9,>=8.1",
"numpy<2,>=1.26",
"pytorch-lightning<3,>=2.1",
"rasterio<2,>=1.3",
"scikit-learn<2,>=1.3",
"segmentation-models-pytorch==0.5.0",
"torch<3,>=2.1",
"torchvision<1,>=0.16",
"torchmetrics<2,>=1.7",
"rich<14,>=13.0",
"pytest>=7.0; extra == \"dev\"",
"black>=23.0; extra == \"dev\"",
"flake8>=6.0; extra == \"dev\""
] | [] | [] | [] | [
"Homepage, https://github.com/m5ghanba/skema",
"Repository, https://github.com/m5ghanba/skema",
"Issues, https://github.com/m5ghanba/skema/issues",
"Documentation, https://github.com/m5ghanba/skema#readme",
"Hugging Face, https://huggingface.co/m5ghanba/SKeMa",
"DOI, https://doi.org/10.57967/hf/6790"
] | twine/6.2.0 CPython/3.12.10 | 2026-02-20T18:57:21.269694 | skema_kelp-0.2.0.tar.gz | 34,463 | 06/a9/30730f38cf4d6da383bc1f1a369e3fc57d126d617abaa0aa54e013ca6896/skema_kelp-0.2.0.tar.gz | source | sdist | null | false | 5b20df4e87a6d73db185836d92ed86ed | 967e2a9724b04b6b41c73efd837ba79a219d1552e13632a671cb306bae8112b2 | 06a930730f38cf4d6da383bc1f1a369e3fc57d126d617abaa0aa54e013ca6896 | null | [
"LICENSE"
] | 167 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.