semvec/pypi-packages huggingface dataset:
rtt-sdk 0.2.0
Scripting SDK for the Red Team Toolkit platform
Requires Python: >=3.7

# RTT Platform Python SDK

This is the formally maintained Python SDK for interacting with a Red Team Toolkit (RTT) Platform C2 server.

**This project is currently in BETA status and subject to significant change until finalized**

This SDK is based on models generated from the OpenAPI specification for the latest platform server. It will
continue to be updated and expanded as more features are finalized in the platform server.

Additional information can be found [here](https://www.netspi.com/company/news/netspi-relaunches-red-team-toolkit/)

## Installation

```
> pip install rtt-sdk
```

## Examples

Collecting current session information

```python
import asyncio
import rtt_sdk

async def main():
    client = rtt_sdk.SlingshotClient()
    user = await client.context_user(True)
    process = await client.context_process()
    print(f"Running as {user.username} in {process.process_id}")

asyncio.run(main())
```

## Asyncronous Code

This SDK makes use of `asyncio` for executing tasks and returning results. Almost every function exposed
on API clients is an asyncronous co-routine and requires an event loop for execution. The easiest way
to accomplish this is to define a wrapper `async main()` function and use the new `asyncio.run()` function
to establish an event loop, and execute your code within (as seen in the examples section)

Some useful primitives that can be used as part of `async`:

```python
results = await foo()
await asyncio.waitfor(foo(), timeout=10)
await asyncio.gather([foo(), bar()])
```

More information can be found [here](https://docs.python.org/3/library/asyncio.html)

## Requirements

- Active RTT license and deployed RTT platform server
- Python 3.7+
polling2 0.5.0
Updated polling utility with many configurable options

[![Build Status](https://travis-ci.com/ddmee/polling2.svg?branch=master)](https://travis-ci.org/ddmee/polling2)
[![PyPI](https://img.shields.io/pypi/dm/polling2.svg)]()
[![PyPI](https://img.shields.io/pypi/v/polling2.svg)]()

# polling2

_Never write another polling function again!_

Documentation available at [Read the Docs](https://polling2.readthedocs.io)

You can install the package from [Pypi](https://pypi.org/project/polling2/)

Polling2 is a powerful python utility used to wait for a function to return a certain expected condition.

Some possible uses cases include:

- Wait for API response to return with code 200
- Wait for a file to exist (or not exist)
- Wait for a thread lock on a resource to expire

Polling2 is handy for getting rid of all that duplicated polling-code. Often, applications require retrying until the correct response is returned. Why re-implement the ability to poll again and again? Use Polling2!

Polling2 is a fork of the original [polling](https://github.com/justiniso/polling). It was forked when the original maintainer failed to respond to issues or PRs. 

Polling2 is _under active development_. Would you like to see a particular feature? Ask and thou shall recieve.

## Installation

```
pip install polling2
```

## Development installation

```shell
# install lib, but use system links from the repo into sitepackages.
python setup.py develop
# install test dependenices.
python setup.py test
# run the tests
pytest tests
```

## Example:

```python
# This call will wait until the file exists, checking every 0.1 seconds and stopping after 3 seconds have elapsed
file_handle = polling2.poll(
    lambda: open('/tmp/myfile.txt'),
    ignore_exceptions=(IOError,),
    timeout=3,
    step=0.1)

# Polling will return the value of your polling function, so you can now interact with it
file_handle.close()
```

There are [more examples](https://polling2.readthedocs.io/en/latest/examples) in the documentation.

## API and user guide at [Read the Docs](https://polling2.readthedocs.io)

[![Read the Docs](https://raw.githubusercontent.com/ddmee/polling2/master/ext/read_the_docs.png)](https://polling2.readthedocs.io)
asyncforismatic 0.0.1
A library for getting quotes from the Forismatic API. Supports asynchronous syntax. Библиотека для получения цитат из Forismatic API. Поддерживает асинхронный синтаксис.
Requires Python: >=3.9

# *Forismatic* ![forismatic_logo](http://forismatic.com/favicon.ico)

## An unoficall library for getting quotes from the Forismatic API. Supports asynchronous syntax.

## Неофицальная библиотека для получения цитат из Forismatic API. Поддерживает асинхронный синтаксис\.

## Installing || Установка

```bash
pip3 install asyncforismatic
```

Requires aiohttp and requests

## Examples || Примеры

```py
import asyncforismatic
import asyncio

# getting sync quote on russian as dict
# синхронное получение цитаты на русском в виде словаря
print(asyncforismatic.quote(lang='ru', as_dict=True)) 

# getting async quote with default params (english language and formated quote)
# асинхронное получение цитаты со стандартными параметрами (английский язык и отформатированная цитата)
async def example():
    return await asyncforismatic.asyncforismatic()
print(asyncio.run(example()))
```

## Methods || Методы

### Getting a quote (async) || Получение цитаты (асинхронно)

***corotinue*** `asyncforismatic(lang='en', *, as_dict=False)`

* Returns an quote from Forismatic API
* Возвращает цитату из Forismatic API

#### Parameters || Параметры

*as_dict*: `bool`

* If True, quote returns as JSON-like object (dict)
* Если True, возвращает результат в JSON'о подобном формате (dict, словарь)

#### Raises exceptions || Поднимает исключения

`TypeError`

* The language is not passed as 'str'
* Язык передан не как 'str'

`LangIsNotSupported`

* The language is not supported
* Язык не поддерживается

**Returns** `Union[str, dict]`
**Возвращает**`Union[str, dict]`

### Getting a quote || Получение цитаты

***def*** `quote(lang='en', *, as_dict=False)`

* Returns an quote from Forismatic API
* Возвращает цитату из Forismatic API

#### Parameters || Параметры

*as_dict*: `bool`

* If True, quote returns as JSON-like object (dict)
* Если True, возвращает результат в JSON'о подобном формате (dict, словарь)

#### Raises exceptions || Поднимает исключения

`TypeError`

* The language is not passed as 'str'
* Язык передан не как 'str'

`LangIsNotSupported`

* The language is not supported
* Язык не поддерживается

**Returns** `Union[str, dict]`
**Возвращает** `Union[str, dict]`

## Exceptions || Исключения

`LangIsNotSupported`

* Raises when the language is not supported
* Возникает когда язык не поддерживается