semvec/pypi-packages huggingface dataset:
sbcli-dev-qos 1.1.3
CLI for managing SimplyBlock cluster


# Simply Block
[![Docker Image Build](https://github.com/simplyblock-io/sbcli/actions/workflows/docker-image.yml/badge.svg)](https://github.com/simplyblock-io/sbcli/actions/workflows/docker-image.yml)

[![Python Unit Testing](https://github.com/simplyblock-io/sbcli/actions/workflows/python-testing.yml/badge.svg)](https://github.com/simplyblock-io/sbcli/actions/workflows/python-testing.yml)


## Install
Add the package repo from AWS CodeArtifact using [awscli](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)

```bash
aws codeartifact login --tool pip --repository sbcli --domain simplyblock --domain-owner 565979732541 --region eu-west-1
```
Install package
```bash
pip install --extra-index-url https://pypi.org/simple sbcli-dev
```

# Components

## Simply Block Core
Contains core logic and controllers for the simplyblock cluster

## Simply Block CLI
Please see this document
[README.md](../main/simplyblock_cli/README.md)


## Simply Block Web API
Please see this document
[README.md](../main/simplyblock_web/README.md)



### local development

FoundationDB requires a client library (libfdb_c.dylib) for the Python bindings to interact with the database.
Depending on the OS architecture, please install the appropriate version from the official github repo

```
wget https://github.com/apple/foundationdb/releases/download/7.3.3/FoundationDB-7.3.3_arm64.pkg
```

setup the code on a management node and the webApp code can be developed by building the `docker-compose-dev.yml` file.


```
sudo docker compose -f docker-compose-dev.yml up --build -d
```
bob3client 0.0.1
Lightweight bob3 client utilities
Requires Python: >=3.11
Keywords: bob3, projects

# bob3 client for python

This is a python client for the bob3 API endpoints. It is lightweight utility to provide
easier access to the API endpoints.

## Installation

```bash
pip install bob3client
```

## Usage

To authenticate against the API you must have a private RSA key file available. This key file
is used to sign the JWT token that is used to authenticate against the API.

Authentication works in such a way that you first register app in the workspace and provide
permissions to it in bob3. There you will need to provide public key of the RSA key pair that
you will use to sign the JWT token. There you also acquire app_id that you will use.

To make easier authentication `bob3client` provides a function `get_auth_token` that will
do all authentication job for you and return already a token that you can use to authenticate
to bob3 API. You will not need to sign JWT token yourself or call `POST /auth` endpoint.

```python
import bob3client

# Acquire an authorization token
# workspace: the workspace name to authorize against
# app_id: the application id that was created in the workspace (see bob3 documentation)
# private_rsa_key_path: the path to the private RSA key file
# Token will expire in 60 minutes by default, to change this use the expire parameter
token = bob3client.get_auth_token('workspace', 'app_id', 'private_rsa_key_path')

# Now you must provide the token in Authorization header to access the API endpoints
# Example using requests library
import requests
headers = {"Authorization": token}
# Get all projects in the workspace where the app is authorized
response = requests.get(bob3client.BOB3_PROD_URL + 'projects', headers=headers)
print(response.json())
```

To get API documentation fetch simply bob3client.BOB3_PROD_URL path in your favorite browser.
GenUserAgent 1.8
Thư Viện Hỗ Trợ Tạo UserAgent, Console v.v
Requires Python: >=3.6

# UserAgent Generator

This project aims to create a simple user-agent generator that can be used to mimic different browsers and devices. This can be particularly useful for web scraping and testing purposes.

## Getting Started v1.6

### Prerequisites
Ensure you have the following installed:
- Python 3.x
- pip

### Installation

Follow these steps to set up the project:

```bash
$ pip install GenUserAgent

```
### Generate User-Agent Facebook
```Python

from Gen import UserAgentGenerator

headers = {
'User-agent': UserAgentGenerator().generate_user_agent(),
'X-Tigon-Is-Retry': 'False',
'X-Fb-Device-Group': '7948',
'X-Graphql-Request-Purpose': 'fetch',
'X-Fb-Privacy-Context': '3643298472347298',
'X-Fb-Friendly-Name': 'FbBloksActionRootQuery-com.bloks.www.bloks.caa.login.async.send_login_request',
}

```
### Logger console
```Python

from Gen import UserAgentGenerator 
from Gen.utils import logger


user_agent = UserAgentGenerator().generate_user_agent()

from Gen.utils import logger
import requests

result =  requests.get("https://api.myip.com")
if result.status_code == 200:
    logger.info(f"SUCCESS - IP : {result.json()['ip']}")
else:
    logger.warning("Not found result !")