semvec/pypi-packages huggingface dataset:
metrics-accumulator-client 1.1.5
This is the python client for metrics accumulator
Requires Python: >=3.8
Keywords: client, metrics-accumulator, prometheus

<h1 align="center" style="border-bottom: none">
   <img alt="Metrics Accumulator" src="https://apoole-personal-bucket.s3.amazonaws.com/images_used_by_links/github/Logo+for+metrics+Accumulator.svg" width="600"><br>Metrics Accumulator
</h1>


# metrics-accumulator-client
This is the official Python client for [metric accumulator](https://github.com/bpoole6/metrics-accumulator).


## Get Started

Start an instance of metric-accumulator

```bash
docker run \ 
 -p 8080:8080 \ 
 bpoole6/metrics-accumulator
```

It is highly advised that you disable the created metrics. The Metrics accumulator doesn't handle the created metrics at this time.

```python
from prometheus_client import metrics
metrics.disable_created_metrics()
```



Create main.js file
```python
from Client import Client, strip_forward_slash
from prometheus_client import exposition, Counter,Gauge, CollectorRegistry, metrics
metrics.disable_created_metrics()
registry = CollectorRegistry()
c = Counter("hello_total", "dock", labelnames=['application'], registry=registry)
c.labels(["app"]).inc()

g = Gauge("man", "dock", labelnames=['application'], registry=registry)
g.labels(["app"]).inc()

client = Client("http://localhost:8080", "0d98f65f-074b-4d56-b834-576e15a3bfa5")
client.update_metrics("default", registry)
print(client.get_metric_group("default").content.decode())
print(client.reload_configurations().status_code)
print(client.reset_metric_group("default").status_code)
print(client.service_discovery().status_code)
print(client.current_configurations().status_code)
```

Please see [metric accumulator](https://github.com/bpoole6/metrics-accumulator) for official documentation.
tj-tpauth 1.1.0
Python library simplifies the process of authenticating accounts with TP Servers.
Requires Python: <4.0,>=3.8

# tj-tpauth

`tj-tpauth` is a Python library for managing user authentication through an API. The library supports both synchronous
and asynchronous methods for login and token-based authentication.

## Installation

To install the library, use pip:

```bash
pip install tj-tpauth
```

## Usage

### Synchronous (Sync)

```python
from tj_tpauth import TJTPAuth

# Initialize TJTPAuth object with API URL and optional timeout
tpauth = TJTPAuth(
    host='http://localhost:3000',
    timeout=10
)

# Log in with username and password
login_status = tpauth.login(
    username='username',
    password='password'
)

# Check login status
if not login_status.status:
    exit(0)

# Authenticate with token
auth_status = tpauth.from_token(login_status.data.token)

# Check authentication status
if not auth_status.status:
    exit(0)

# Print authentication data
print(auth_status.data)
```

### Asynchronous (Async)

```python
import asyncio
from tj_tpauth import TJTPAuth

# Initialize TJTPAuth object with API URL and optional timeout
tpauth = TJTPAuth(
    host='http://localhost:3000',
    timeout=10
)


async def main():
    # Log in with username and password
    login_status = await tpauth.aio_login(
        username='username',
        password='password'
    )

    # Check login status
    if not login_status.status:
        exit(0)

    # Authenticate with token
    auth_status = await tpauth.aio_from_token(login_status.data.token)

    # Check authentication status
    if not auth_status.status:
        exit(0)

    # Print authentication data
    print(auth_status.data)


# Run asynchronous function
asyncio.run(main())
```

## Main Classes

- `TPAuthData`: Contains user authentication information.
- `TPAuthStatus`: Represents the authentication status, including error information.
- `TJTPAuth`: Provides synchronous and asynchronous methods for login and token-based authentication.

## Error Handling

- **`Error.NOTHING`**: No error.
- **`Error.TIMEOUT`**: Timeout error.
- **`Error.UNAUTHORIZED`**: Unauthorized error.
- **`Error.PARSING`**: Data parsing error.

## References

For more information about `requests` and `aiohttp`, refer to their official documentation:

- [Requests Documentation](https://docs.python-requests.org/)
- [Aiohttp Documentation](https://docs.aiohttp.org/)

## License

This library is released under the MIT License.

## Contact

If you have any questions or issues, please open an issue on [GitHub](https://github.com/duynguyen02/tj_tpauth/issues) or
email us at [duynguyen02.dev@gmail.com](mailto:duynguyen02.dev@gmail.com).
gtoolkit_tiktokenize 0.1.7
Glamorous Toolkit tiktoken wrapper
Requires Python: <4,>=3.8

# gtoolkit_tiktokenize
# Glamorous Toolkit tiktoken wrapper

This library provides a wrapper around [tiktoken](https://github.com/openai/tiktoken)
for use in Glamorous Toolkit.

## Quick start

```python
import gtoolkit_tiktokenize as gt_tokenize
gt_tokenize.tokenize('Hello World!', 'gpt-4')
```

# Info

feenk team (gt@feenk.com)

- https://gtoolkit.com
- https://feenk.com
- https://github.com/feenkcom/PythonBridge