# SierraβSDK
π **Overview**
---------------
SierraβSDK is a Python framework for building and managing invoker scripts that can be used across different nodes in Sierra during any investigation.
### Project Goals
* Provide a robust and flexible framework for managing invoker scripts
* Offer a simple and intuitive API for building and compiling Sierra applications
* Support extensibility through plugins and custom configurations
### Key Features
* **Modular Design**: SierraβSDK is built with a modular architecture, allowing for easy extension and customization
* **Invoker Script Management**: Easily build, compile, and load invoker scripts across different nodes in Sierra
* **Plugin Support**: Extend the functionality of SierraβSDK through custom plugins
## βοΈ Installation
-----------------
### pip Installation
You can install SierraβSDK using pip:
```bash
pip install sierra-dev
```
### Installation from Source
To install SierraβSDK from source, clone the repository and run the following command:
```bash
git clone https://github.com/xsyncio/sierra-dev.git
cd sierra-dev
pip install .
```
## π§ Usage Examples
-------------------
### Building an Invoker Script
```python
import sierra
# βββ Define the Invoker ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
invoker = sierra.InvokerScript(
name="greet",
description="Prints a personalized greeting message."
)
invoker.requirement(["requests"])
# βββ Dependency functions ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
@invoker.dependancy
def random_function_one(param: int) -> int:
return param * 2
@invoker.dependancy
def random_function_two(message: str) -> str:
return message.upper()
@invoker.dependancy
def random_function_three(value: float) -> float:
return value / 3.14
@invoker.dependancy
def random_function_four(flag: bool) -> bool:
return not flag
# βββ Entry point βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
@invoker.entry_point
def run(
name: sierra.Param[
str | None,
sierra.SierraOption(
description="The name of the person to greet.",
mandatory="MANDATORY"
)
],
polite: sierra.Param[
bool | None,
sierra.SierraOption(
description="Whether to include a polite phrase in the greeting.",
mandatory=None
)
] = False,
) -> None:
"""
Greet the specified user by name, optionally politely.
Parameters
----------
name : str
Name of the user (mandatory).
polite : bool, optional
If True, includes a polite prefix.
"""
if name is None:
# Missing mandatory parameter
result = sierra.create_error_result("Missing mandatory parameter: name")
else:
# Build greeting
greeting = f"Hello, {name}!"
if polite:
greeting = f"Good day to you, {name}!"
# Wrap the greeting in a TreeResult
result = sierra.create_tree_result([greeting])
# Print the structured result
print(result)
# βββ Loader ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
def load(client: sierra.SierraDevelopmentClient) -> None:
"""
Register this invoker with the given Sierra client.
Parameters
----------
client : SierraDevelopmentClient
The Sierra client instance.
"""
client.load_invoker(invoker)
```
### Compiling
```python
import sierra
# Initialize Sierra client with DEBUGβlevel logging
client = sierra.SierraDevelopmentClient(
environment_name="idd",
logger=sierra.UniversalLogger(
name="Sierra",
level=sierra.sierra_internal_logger.LogLevel.DEBUG,
),
)
# Discover and register all invoker scripts
client.load_invokers_from_scripts()
# Generate standalone scripts and config.yaml
client.compiler.compile()
```
## π¦ API Highlights
-------------------
* `sierra.core.builder`: Builder for invoker scripts
* `sierra.core.compiler`: Compiler for invoker scripts
* `sierra.core.loader`: Loader for compiled scripts
* `sierra.abc.sierra`: Abstract base classes for Sierra components
* `sierra.invoker`: Invoker script definitions
## π οΈ Configuration & Extensibility
------------------------------------
SierraβSDK supports extensibility through plugins and custom configurations. You can add custom plugins by creating a new folder in the `plugins/` directory and adding your plugin code.
### Plugin Folders
* `plugins/`: Folder for custom plugins
* `core/`: Folder for core SierraβSDK components
* `abc/`: Folder for abstract base classes
* `invoker/`: Folder for invoker script definitions
## π‘ Contributing Guidelines & Code of Conduct
---------------------------------------------
We welcome contributions to SierraβSDK! Please see our [CONTRIBUTING.md](CONTRIBUTING.md) file for guidelines on how to contribute.
### Code of Conduct
We follow the [Python Code of Conduct](https://www.python.org/psf/conduct/).
## π License & Authors
-----------------------
SierraβSDK is licensed under the [GNU AFFERO GENERAL PUBLIC LICENSE](LICENSE).
### Authors
* [Xsyncio](https://github.com/xsyncio)
Raw data
{
"_id": null,
"home_page": "https://github.com/xsyncio/sierra-dev",
"name": "sierra-dev",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": "sierra, invoker, script, framework",
"author": "Xsyncio",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/31/d6/2eea5e9d407ac2b8d7034f6b180a67018e046270b8b7a58940ed33badc7e/sierra_dev-0.1.5.tar.gz",
"platform": null,
"description": "# Sierra\u2011SDK\n\n\ud83d\ude80 **Overview**\n---------------\n\nSierra\u2011SDK is a Python framework for building and managing invoker scripts that can be used across different nodes in Sierra during any investigation.\n\n### Project Goals\n\n* Provide a robust and flexible framework for managing invoker scripts\n* Offer a simple and intuitive API for building and compiling Sierra applications\n* Support extensibility through plugins and custom configurations\n\n### Key Features\n\n* **Modular Design**: Sierra\u2011SDK is built with a modular architecture, allowing for easy extension and customization\n* **Invoker Script Management**: Easily build, compile, and load invoker scripts across different nodes in Sierra\n* **Plugin Support**: Extend the functionality of Sierra\u2011SDK through custom plugins\n\n## \u2699\ufe0f Installation\n\n-----------------\n\n### pip Installation\n\nYou can install Sierra\u2011SDK using pip:\n\n```bash\npip install sierra-dev\n```\n\n### Installation from Source\n\nTo install Sierra\u2011SDK from source, clone the repository and run the following command:\n\n```bash\ngit clone https://github.com/xsyncio/sierra-dev.git\ncd sierra-dev\npip install .\n```\n\n## \ud83d\udd27 Usage Examples\n\n-------------------\n\n### Building an Invoker Script\n\n```python\nimport sierra\n\n# \u2500\u2500\u2500 Define the Invoker \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\ninvoker = sierra.InvokerScript(\n name=\"greet\",\n description=\"Prints a personalized greeting message.\"\n)\n\n\ninvoker.requirement([\"requests\"])\n\n\n# \u2500\u2500\u2500 Dependency functions \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n@invoker.dependancy\ndef random_function_one(param: int) -> int:\n return param * 2\n\n@invoker.dependancy\ndef random_function_two(message: str) -> str:\n return message.upper()\n\n@invoker.dependancy\ndef random_function_three(value: float) -> float:\n return value / 3.14\n\n@invoker.dependancy\ndef random_function_four(flag: bool) -> bool:\n return not flag\n\n# \u2500\u2500\u2500 Entry point \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n@invoker.entry_point\ndef run(\n name: sierra.Param[\n str | None,\n sierra.SierraOption(\n description=\"The name of the person to greet.\",\n mandatory=\"MANDATORY\"\n )\n ],\n polite: sierra.Param[\n bool | None,\n sierra.SierraOption(\n description=\"Whether to include a polite phrase in the greeting.\",\n mandatory=None\n )\n ] = False,\n) -> None:\n \"\"\"\n Greet the specified user by name, optionally politely.\n\n Parameters\n ----------\n name : str\n Name of the user (mandatory).\n polite : bool, optional\n If True, includes a polite prefix.\n \"\"\"\n if name is None:\n # Missing mandatory parameter\n result = sierra.create_error_result(\"Missing mandatory parameter: name\")\n else:\n # Build greeting\n greeting = f\"Hello, {name}!\"\n if polite:\n greeting = f\"Good day to you, {name}!\"\n # Wrap the greeting in a TreeResult\n result = sierra.create_tree_result([greeting])\n\n # Print the structured result\n print(result)\n\n# \u2500\u2500\u2500 Loader \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\ndef load(client: sierra.SierraDevelopmentClient) -> None:\n \"\"\"\n Register this invoker with the given Sierra client.\n\n Parameters\n ----------\n client : SierraDevelopmentClient\n The Sierra client instance.\n \"\"\"\n client.load_invoker(invoker)\n```\n\n### Compiling\n\n```python\nimport sierra\n\n# Initialize Sierra client with DEBUG\u2011level logging\nclient = sierra.SierraDevelopmentClient(\n environment_name=\"idd\",\n logger=sierra.UniversalLogger(\n name=\"Sierra\",\n level=sierra.sierra_internal_logger.LogLevel.DEBUG,\n ),\n)\n\n# Discover and register all invoker scripts\nclient.load_invokers_from_scripts()\n\n# Generate standalone scripts and config.yaml\nclient.compiler.compile()\n```\n\n## \ud83d\udce6 API Highlights\n\n-------------------\n\n* `sierra.core.builder`: Builder for invoker scripts\n* `sierra.core.compiler`: Compiler for invoker scripts\n* `sierra.core.loader`: Loader for compiled scripts\n* `sierra.abc.sierra`: Abstract base classes for Sierra components\n* `sierra.invoker`: Invoker script definitions\n\n## \ud83d\udee0\ufe0f Configuration & Extensibility\n\n------------------------------------\n\nSierra\u2011SDK supports extensibility through plugins and custom configurations. You can add custom plugins by creating a new folder in the `plugins/` directory and adding your plugin code.\n\n### Plugin Folders\n\n* `plugins/`: Folder for custom plugins\n* `core/`: Folder for core Sierra\u2011SDK components\n* `abc/`: Folder for abstract base classes\n* `invoker/`: Folder for invoker script definitions\n\n## \ud83d\udca1 Contributing Guidelines & Code of Conduct\n\n---------------------------------------------\n\nWe welcome contributions to Sierra\u2011SDK! Please see our [CONTRIBUTING.md](CONTRIBUTING.md) file for guidelines on how to contribute.\n\n### Code of Conduct\n\nWe follow the [Python Code of Conduct](https://www.python.org/psf/conduct/).\n\n## \ud83d\udcdd License & Authors\n\n-----------------------\n\nSierra\u2011SDK is licensed under the [GNU AFFERO GENERAL PUBLIC LICENSE](LICENSE).\n\n### Authors\n\n* [Xsyncio](https://github.com/xsyncio)\n",
"bugtrack_url": null,
"license": null,
"summary": "A framework for building and managing invoker scripts across different nodes in Sierra.",
"version": "0.1.5",
"project_urls": {
"Documentation": "https://xsyncio.github.io/sierra-dev",
"Homepage": "https://github.com/xsyncio/sierra-dev",
"Source": "https://github.com/xsyncio/sierra-dev",
"Tracker": "https://github.com/xsyncio/sierra-dev/issues"
},
"split_keywords": [
"sierra",
" invoker",
" script",
" framework"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "dcfefd224a932b8250465f66e97eac961a9e57b305427202fceb919286c1f419",
"md5": "b2df9c793e653ea7ec8c8fe7cffe00f4",
"sha256": "3575937e61c4e5c2eee08dc83d0127beaed397086ce909317125d4ccd09da05e"
},
"downloads": -1,
"filename": "sierra_dev-0.1.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b2df9c793e653ea7ec8c8fe7cffe00f4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 49238,
"upload_time": "2025-07-25T06:42:39",
"upload_time_iso_8601": "2025-07-25T06:42:39.119120Z",
"url": "https://files.pythonhosted.org/packages/dc/fe/fd224a932b8250465f66e97eac961a9e57b305427202fceb919286c1f419/sierra_dev-0.1.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "31d62eea5e9d407ac2b8d7034f6b180a67018e046270b8b7a58940ed33badc7e",
"md5": "86c1c80d0e277f6a60db69d90b0443ff",
"sha256": "648c347dd2e8a65a14c007a97b165af786526e9f665db3d14ed4fc41a23610fd"
},
"downloads": -1,
"filename": "sierra_dev-0.1.5.tar.gz",
"has_sig": false,
"md5_digest": "86c1c80d0e277f6a60db69d90b0443ff",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 45394,
"upload_time": "2025-07-25T06:42:40",
"upload_time_iso_8601": "2025-07-25T06:42:40.501293Z",
"url": "https://files.pythonhosted.org/packages/31/d6/2eea5e9d407ac2b8d7034f6b180a67018e046270b8b7a58940ed33badc7e/sierra_dev-0.1.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-25 06:42:40",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "xsyncio",
"github_project": "sierra-dev",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "colorama",
"specs": [
[
"==",
"0.4.6"
]
]
},
{
"name": "httpx",
"specs": [
[
"==",
"0.28.1"
]
]
}
],
"lcname": "sierra-dev"
}