semvec/pypi-packages huggingface dataset:
alg_types 0.1.2
a library to implement rust like enums
Requires Python: <4.0,>=3.10

# alg_types
`alg_types` is my attempt, more of a 'hack' to implement rust like enums in python.

# Examples
Here is an attempt to implement rust result using it
```python
from typing import TypeVar, Generic, Callable, Self
from alg_types import alg, variant
T,U = TypeVar("T"), TypeVar("U")
@alg
class Result(Generic[T,U]):
    @variant
    def Ok(x:T): ...

    @variant
    def Err(st:U): ...
    
    def is_ok(self):
        return isinstance(self, Result.Ok)
    
    def is_err(self):
        return isinstance(self, Result.Err)
    
    def map(self, f: Callable[[T], T]) -> Self:
        match self:
            case Result.Ok(x):
                return Result.Ok(f(x))
            case Result.Err(st):
                return Result.Err(st)
    
    def map_err(self, f: Callable[[U], U]) -> Self:
        match self:
            case Result.Ok(x):
                return Result.Ok(x)
            case Result.Err(st):
                return Result.Err(f(st))
    
    def unwrap(self) -> T:
        match self:
            case Result.Ok(x):
                return x
            case Result.Err(st):
                raise Exception(st)
    
    def unwrap_err(self) -> U:
        match self:
            case Result.Ok(x):
                raise Exception(x)
            case Result.Err(st):
                return st
    
    def unwrap_or(self, default: T) -> T:
        match self:
            case Result.Ok(x):
                return x
            case Result.Err(st):
                return default
    
    def unwrap_or_else(self, f: Callable[[], T]) -> T:
        match self:
            case Result.Ok(x):
                return x
            case Result.Err(st):
                return f()
    
    def expect(self, msg: str) -> T:
        match self:
            case Result.Ok(x):
                return x
            case Result.Err(_st):
                raise Exception(msg)
    
x = Result.Err("1").map_err(lambda x: x + '1')
print(x)
```
outputs: `Result.Err(st='11')`
secure-encryption 0.0.1
A simple and secure encryption service for Python.
Requires Python: >=3.6

```markdown
# Secure Encryption

A simple and secure encryption service for Python.

## Features

- AES-256-CTR encryption and decryption
- HMAC-SHA512 message authentication
- Secure environment variable handling for encryption and MAC keys

## Installation

Install the package using pip:

```bash
pip install secure-encryption
```

## Usage

### Setting Up Environment Variables

Before using the `CryptoService`, you need to set up environment variables for the encryption and MAC keys. These keys should be base64 encoded 32-byte keys (for AES-256).

```python
import os
import base64

# Generate random keys and encode them in base64
encryption_key = base64.b64encode(os.urandom(32)).decode('utf-8')
mac_key = base64.b64encode(os.urandom(32)).decode('utf-8')

# Set environment variables
os.environ['CRYPTO_SERVICE_KEY'] = encryption_key
os.environ['CRYPTO_SERVICE_MAC_KEY'] = mac_key
```

### Encrypting a Message

To encrypt a plaintext message:

```python
from secure_encryption.crypto_service import CryptoService

plaintext = "This is a secret message."
encrypted_message = CryptoService.encrypt(plaintext)
print(f"Encrypted: {encrypted_message}")
```

### Decrypting a Message

To decrypt an encrypted message:

```python
from secure_encryption.crypto_service import CryptoService

decrypted_message = CryptoService.decrypt(encrypted_message)
print(f"Decrypted: {decrypted_message}")
```

### Example

```python
import os
import base64
from secure_encryption.crypto_service import CryptoService

# Generate and set keys
encryption_key = base64.b64encode(os.urandom(32)).decode('utf-8')
mac_key = base64.b64encode(os.urandom(32)).decode('utf-8')

os.environ['CRYPTO_SERVICE_KEY'] = encryption_key
os.environ['CRYPTO_SERVICE_MAC_KEY'] = mac_key

# Encrypt a message
plaintext = "This is a secret message."
encrypted_message = CryptoService.encrypt(plaintext)
print(f"Encrypted: {encrypted_message}")

# Decrypt the message
decrypted_message = CryptoService.decrypt(encrypted_message)
print(f"Decrypted: {decrypted_message}")
```

## Running Tests

Unit tests are provided using the `unittest` framework. To run the tests, use the following command:

```bash
python -m unittest discover tests
```

## Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
```

This README file covers the basic usage, setup, and additional information about your `secure-encryption` package.
Money-Control-Scrap 0.1.2
A package to scrape news from Money Control

# Product Delivered By Aniruddha Kumar

# Money_Control_Scrap

Money_Control_Scrap is a Python package for scraping the latest business news from the Money Control website (One of the biggest website on Finance ion India)

## Features

- Scrape news headlines, links, and publication times from Money Control.
- Save the scraped data to a CSV file.
- The CSV contains, date-time, Headline and the Link to that site

## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install Money_Control_Scrap.

```bash
pip install Money_Control_Scrap
```



## Usage
### Importing and Using the Package

python
```
from Money_Control_Scrap import fetch_news_headlines

# Define the full path to the chromedriver
chromedriver_path = r"./path_to_chrome_driver" 

# Fetch the news headlines
csv_path = fetch_news_headlines(chromedriver_path)
print(f"News headlines saved to: {csv_path}")

# Fetch news headlines and save to CSV
fetch_news_headlines()
```

### Command Line Interface
After installing the package, you can also run the scraper directly from the command line:

```
Money_Control_Scrap /path_to_chrome_driver
```
## Development
### Project Structure

```
Money_Control_Scrap/
    __init__.py
    main.py
.github/
    workflows/
        python-package.yml
setup.py
requirements.txt
README.md

```
### Setup for Development

1. Clone the repository:

```
git clone https://github.com/your-username/Money_Control_Scrap.git
cd Money_Control_Scrap
```

2. Create and activate a virtual environment:
```
python -m venv venv
source venv/bin/activate  # On Windows use `venv\Scripts\activate`
```

3. Install the dependencies:

```
pip install -r requirements.txt
```

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change

## Contact
For any inquiries, please contact Aniruddha Kumar at foraniruddhakumar@gmail.com.
chemlibmgr 0.0.1
Fundamental package for compound library management
Requires Python: >=3.10

# chemlibmgr

## Introduction

`chemlibmgr` is a Python library designed to simplify the management of chemical compound libraries databases.

## Features

- **Data Handling**: Easily manage compound properties such as molecular weight, melting point, and more.
- **Library Analysis**: Easily analyze the property distribution of compounds in your library.
- **Search Functionality**: Perform quick searches based on compound properties or chemical structures.

## Installation

To install `chemlibmgr`, use pip:

```bash
pip install chemlibmgr
```

## Usage

### Basic Usage

```python
from chemlibmgr.manager import Manager

# Initialize the manager with your database configuration
mgr = Manager(database="compounds.db")

# Add new compounds from smiles file
mgr.add_compound('/path/to/smifile', calc_props=False)

# Retrieve compounds
compounds = mgr.search_compounds({'name': 'Aspirin'})
for compound in compounds:
    print(compound)

# Add a new property field
mgr.add_field('Classification', 'TEXT')

# Update a compound's property
mgr.update_compound_property(
    smiles='CC(=O)Oc1ccccc1C(=O)O', Classification='Drug')

# Delete a compound
mgr.delete_compound(name='Aspirin')

mgr.close()
```

## Contributing

We welcome contributions to improve `chemlibmgr`. If you find a bug or have an idea for a new feature, please open an issue or submit a pull request.

## License

This project is licensed under the Apache License - see the [Apache 2.0 license](https://github.com/ojtian/chemlibmgr/blob/main/LICENSE) file for details.
tensordock-python-sdk 0.1.0
A Python SDK for TensorDock API

# Unofficial TensorDock Python SDK

This is an unofficial Python SDK for interacting with the TensorDock Marketplace API. It provides a convenient way to manage virtual machines, containers, and billing information programmatically. Please note that this SDK is not officially supported or endorsed by TensorDock.

## Installation

You can install this unofficial TensorDock Python SDK using pip:

```
pip install unofficial-tensordock-python-sdk
```

## Configuration

To use the SDK, you'll need to obtain an API key and token from the TensorDock marketplace. You can get these from your TensorDock dashboard at https://marketplace.tensordock.com/api

## Usage

Here's a quick example of how to use the SDK:

```python
from unofficial_tensordock import TensorDockAPI

# Initialize the API client
api = TensorDockAPI(api_key='your_api_key', api_token='your_api_token')

# List your virtual machines
vms = api.virtual_machines.list_vms()
print(vms)

# Deploy a new virtual machine
new_vm = api.virtual_machines.deploy_vm(
    name="My New VM",
    gpu_count=1,
    gpu_model="rtx3080-pcie-10gb",
    vcpus=4,
    ram=16,
    storage=100,
    operating_system="Ubuntu 20.04 LTS"
)
print(new_vm)
```

## Features

This unofficial SDK aims to provide access to the following TensorDock API endpoints:

- Authorization
- Servers
- Virtual Machines
- Containers
- Billing

For a full list of features and their implementations, please refer to the source code or the inline documentation.

## Documentation

For detailed documentation on each method, please refer to the inline docstrings in the source code. For official API documentation, please visit the [TensorDock API Documentation](https://marketplace.tensordock.com/api).

## Contributing

Contributions to this unofficial TensorDock Python SDK are welcome! Please feel free to submit issues, fork the repository and send pull requests. As this is an unofficial project, community involvement is crucial for its maintenance and improvement.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Support

For issues related to this unofficial SDK, please open an issue on our [GitHub repository](https://github.com/yourusername/unofficial-tensordock-python-sdk).

For questions about the TensorDock API itself or for official support, please contact TensorDock directly through their official channels.

## Acknowledgements

This project is based on the public API documentation provided by TensorDock. We are grateful for their detailed documentation which makes this unofficial SDK possible.
automatic-file-manager 0.0.1
Automatic file manager
Requires Python: >=3.6

# automatic_file_manager


[![image](https://img.shields.io/pypi/v/automatic_file_manager.svg)](https://pypi.python.org/pypi/automatic_file_manager)
[![image](https://img.shields.io/conda/vn/conda-forge/automatic_file_manager.svg)](https://anaconda.org/conda-forge/automatic_file_manager)


**automatic file manager**


-   Free software: MIT License
-   Documentation: https://youssefbriki1.github.io/automatic_file_manager
    

## Features

-   TODO
pydemolib 0.1.0
A simple example library
Requires Python: >=3.6

# My Library

A simple example library.

## Installation

```bash
pip install pydemolib


from my_library.module1 import hello_world

print(hello_world())


Follow these steps, and youâ€™ll have your Python library ready for others to use and contribute to! If you have any specific features or topics you want to include in your library, let me know, and I can provide more detailed guidance.