semvec/pypi-packages huggingface dataset:
EcotrustAPI 1.3.0
Biblioteca para interação com API do EcotrustET
Requires Python: >=3.9


    # EcotrustAPI - Python3
Biblioteca que interage com a api do Ecotrust e normaliza alguns retornos da plataforma.


# Ações possíveis pela lib

 - Criar scan parametrizado e executá-lo
 - Cadastrar ativo
 - Obter detalhes do ativo
 - Obter relatório
 - Executar scans 
 - Executar scan de forma rápida

## Exemplo execução de scan rápido
```py
def main():
    token = '<token>'

    api = EcotrustAPI(token, "https://instancia.ecotrust.io/")

    """
       Se pular_execucao_com_erro=True, não será feito raise da exceção APIError se não for possível executar o scan 
       usando um sensor específico, e portanto será retornado os ID's dos scans que foram executados com sucesso,
       então há possibilidade de ser retornado um dict vazio "{}" caso todos falhem. 
       
       Retorna um dicionário com: 
         {'NET-SCAN': 96, 'DNS-SCAN': 97, 'MALWARE': 98, 'WEBAPP-OWASP': 99}
         
        Na forma: 
          {
             'SENSOR NOME': ID DO SCAN INICIADO
          }
          
        O único valor volátil é o ID do scan, o nome do sensor é IMUTÁVEL.
    """
    scans_ids = api.fast_scan("pudim.com.br", pular_execucao_com_erro=False)

    # scans_ids[SENSOR] = ID DO SCAN INICIADO MAPEADO PELO SENSOR

    # Com o id do scan é possível verificar se foi finalizado ou se aconteceu algum erro
    req_st = requests.get(f'https://instancia.ecotrust.io/scans/api/v1/by-id/{scans_ids["NET-SCAN"]}', headers={
        'Authorization': 'Token {}'.format(token)
    })

    # Se o status estiver FINISHED, o scan finalizou com êxito e o relatório do mesmo já está disponível
    if req_st.json()['status'] == 'finished':

        # Obtém relatório CSV especificando ID do Scan que finalizou
        requests.get(f'https://instancia.ecotrust.io/scans/api/v1/report/csv/{scans_ids["NET-SCAN"]}', headers={
            'Authorization': 'Token {}'.format(token)
        })

        # Obtém relatório HTML espcificando ID do Scan que finalizou
        requests.get(f'https://instancia.ecotrust.io/scans/api/v1/report/html/{scans_ids["NET-SCAN"]}', headers={
            'Authorization': 'Token {}'.format(token)
        })

        # Obtém relatório JSON espcificando ID do Scan que finalizou
        requests.get(f'https://instancia.ecotrust.io/scans/api/v1/report/json/{scans_ids["NET-SCAN"]}', headers={
            'Authorization': 'Token {}'.format(token)
        })


if __name__ == "__main__":
    main()
```
binance-aiohttp 0.0.5
asynchronous binance client based on asyncio and aiohttp
Requires Python: >=3.9

# asynchronous_binance_client(asyncio and aiohttp)

This is an asynchronous library that is written for using binance services.

You need aiohttp and asyncio for delealing with methods and properties.


1- First instantiate from BinanceFuturesClient:

<pre><code>from binance_aiohttp.client import BinanceFuturesClient
binance_client = BinanceFuturesClient(api_key, secret_key, testnet=False)</code></pre>


2 - Then from aiohttp.ClientSession:

<pre><code>async with aiohttp.ClientSession(json_serialize=ujson.dumps) as session:  </code></pre>


3- Finally await methods:

<pre><code>await binance_client.candlestick_data(session, 'BTCUSDT', interval='4h', limit=300)</code></pre>


## Example:

<pre><code>
import asyncio
import aiohttp
import ujson
from binance_aiohttp.client import BinanceFuturesClient
binance_client = BinanceFuturesClient(api_key, secret_key, testnet=False)


async def fetch():
  async with aiohttp.ClientSession(json_serialize=ujson.dumps) as session:
    result = await asyncio.create_task(binance_client.candlestick_data(session, 'BTCUSDT', interval='4h', limit=300))
    print(result)


asyncio.run(fetch())
</code></pre>
sborl 0.0.8
Schema-based Operator Relation Libraries
Requires Python: >=3.8

# sborl - Schema-based Operator Relation Libraries

This library provides a base for creating relation endpoint libraries for use
with [charmed operators and Juju][charms]. It tries to make creating Pythonic
implementations of a relation interface protocol straightforward and
approachable, while encouraging good patterns such as using schema-based
interface protocol validation, providing helpers for testing charms using
your library, and surfacing problems with relations in a clean way.


# Example

An example endpoint class and usage might look like:

```python
class RandomURLRequirer(sborl.relation.EndpointWrapper):
    INTERFACE = "random-url"
    ROLE = "requires"
    SCHEMA = Path(__file__) / "schema.yaml"
    LIMIT = 1

    @property
    def url(self):
        if not self.is_ready():
            return None
        relation = self.relations[0]
        return self.unwrap(relation)[relation.app]["url"]


class MyCharm(ops.charm.CharmBase):
    def __init__(self, *args):
        super().__init__(*args)
        self.random_url = RandomURLRequirer(charm=self, endpoint="random-url-provider")
        self.framework.observe(self.random_url.on.ready, self._log_url)

    def _log_url(self, event):
        log.info(f"Got random URL: {self.random_url.url}")
```


[charms]: https://juju.is/docs
Uni-Legacy 1.0.0
A simple python library for convert sinhala unicode font to legacy font. Supported for FM fonts and Isi fonts.This library can be used offline
Requires Python: >=3.6

# Uni-Legacy
--- ---
###### Uni-Legacy is a Python library used to Sinhala unicode font Converte to legacy font offline.
 - ###### FM legacy Font
 - ###### Isi legacy Font

## Installation
###### To install, run the following command:
```bash
python3 pip install Uni-Legacy
```

## for FM fonts
###### Sinhala Unicode convert to FM font type
```python
from uni_legacy import uni2fm
Unicode_font = "à·ƒà·’à¶‚à·„à¶½ à¶ºà·”à¶±à·’à¶šà·šà¶­"
FM_font = uni2fm(Unicode_font)
print(FM_font)
```

## for Isi fonts
###### Sinhala Unicode convert to Isi font type

```python
from uni_legacy import uni2isi
Unicode_font = "à·ƒà·’à¶‚à·„à¶½ à¶ºà·”à¶±à·’à¶šà·šà¶­"
Isi_font = uni2isi(Unicode_font)
print(Isi_font)
```
bedrock-cgi 2.0.20
Bedrock-2 for CGI
Requires Python: >=3.6

# Bedrock-2 (CGI)
CGI implementation of Bedrock-2 in python 

## Testing the Bedrock service
```
curl -X POST -d '{ "blah": "boo", "event": "ok" }' -H "Content-Type: application/json; charset=UTF-8" http://localhost/cgi-bin/rpi_sensor.py -i
```

## Using IntelliJ IDEA
In module settings, make sure to mark the src/ and test/ directories as 'sources' so that IDEA will find the bedrock_cgi module.