semvec/pypi-packages huggingface dataset:
stochastic-parrot 0.0.1
A package for handling errors with custom logging that lets OpenAI API make suggestions.

# Custom Error Handler: Stochastic Parrot

Stochastic Parrot is a Python package that provides a robust way to handle uncaught exceptions in your Python scripts. It logs error details, displays them in a color-coded console output, and leverages OpenAI to suggest fixes.

## Features:

- Colored Console Logging: Utilizes different colors for log levels like DEBUG, INFO, WARNING, ERROR, and CRITICAL.
- File Logging: Automatically logs errors to a file named 'automated_error_handling.log'.
- Traceback Capture: Gathers detailed traceback information including surrounding lines of code where the error occurred.
- OpenAI Integration: Sends error information to OpenAI's GPT-4 model to get suggested fixes.

## How to Use:

1. Installation: Install the package using pip install stochastic-parrot.
2. Initialization: Import and initialize Stochastic Parrot in your script:
   import stochastic_parrot
   stochastic_parrot.initialize()

## Components:

- ColoredConsoleHandler: A custom logging handler class that extends logging.StreamHandler. It allows for log messages to be printed to the console in different colors based on the log level.
- custom_error_handler: A function to be set as sys.excepthook to handle uncaught exceptions. It captures the traceback, reads surrounding code, logs the details, and calls the OpenAI API to suggest fixes.
- openai_chat_completion_base_query: A function to query OpenAI's GPT-4 model. It sends the error details and receives a suggested code fix in response.
- initialize: A function to initialize Stochastic Parrot. It sets up the OpenAI API key and sys.excepthook.

## Requirements:

- openai: To interact with the OpenAI API.
- termcolor: To colorize the console output.
- getpass: To get the OpenAI API key from the user.
- logging: To log the error details.
- sys: To set the custom error handler as sys.excepthook.
- traceback: To capture the traceback.

## License:

This project is licensed under the MIT License. See the LICENSE.txt file for details.
marketfeed-multi-broker-sdk 0.1.25
Multi Broker SDK

# Multi-Broker SDK

Multi-Broker SDK is a Python library that allows you to seamlessly integrate multiple brokerage services in your application. This package simplifies interaction with different brokers, providing a unified way to implement and manage your trades.

## Installation

Use the package manager pip to install BrokerSDK. Run the following command in your terminal:

```
pip install marketfeed-multi-broker-sdk
pip install git+https://github.com/tradeclone/multi-broker-sdk.git
```

## Usage

To utilize the functionality of BrokerSDK, import it into your Python script:

```
from marketfeed_multi_broker_sdk import BrokerSDK
from marketfeed_multi_broker_sdk import Broker, Login, LoginResponse
```

Initialize the SDK with the specific broker's name and user details:

```
sdk_xts = BrokerSDK(Broker.XTS, client_code='CLIENT_CODE')
sdk_fyers = BrokerSDK(Broker.FYERS, client_code='CLIENT_CODE')
sdk_shoonya = BrokerSDK(Broker.SHOONYA, client_code='CLIENT_CODE')
sdk_kotak_neo = BrokerSDK(Broker.KOTAK_NEO, client_code='CLIENT_CODE')

```

Use the BrokerSDK to log in. The BrokerSDK handles communication with the specific broker based on the provided broker name.

For FYERS:

```
loginResponse: LoginResponse = sdk_fyers.login(
    Login(
        totp_key="TOTP_KEY",
        pin="0000"
    )
)
if loginResponse.token == "":
    print(loginResponse.message)
else:
    print("TOKEN GENERATED", loginResponse.token)
```

For XTS:

```
loginResponse: LoginResponse = sdk_xts.login(
        Login(
            api_key="API_KEY",
            api_secret="API_SECRET"
        )
    )
if loginResponse.token == "":
    print(loginResponse.message)
else:
    print("TOKEN GENERATED", loginResponse.token)
```

For SHOONYA:

```
loginResponse: LoginResponse = sdk_shoonya.login(
        Login(
            password="PASSWORD",
            totp_key="TOTP_KEY",
            app_vendor="APP_VENDOR",
            app_imei="APP_IMEI",
            app_key="APP_KEY"
        )
    )
if loginResponse.token == "":
    print(loginResponse.message)
else:
    print("TOKEN GENERATED", loginResponse.token)
```

For KOTAK_NEO:

```
loginResponse: LoginResponse = sdk_kotak_neo.login(
        Login(
            mobile="MOBILE",
            password="PASSWORD",
            mpin="MPIN",
            consumer_key="CONSUMER_KEY",
            consumer_secret="CONSUMER_SECRET"
        )
    )
if loginResponse.token == "":
    print(loginResponse.message)
else:
    print("TOKEN GENERATED", loginResponse.token)
```

# Contributing

We welcome contributions from the community. If you'd like to contribute to BrokerSDK, feel free to submit a pull request or open an issue on our GitHub page.

Please make sure to update tests as appropriate.

For further details and updates about this project, please read through the documentation on our GitHub page.

Remember, your contributions enhance the capabilities of our project. Happy coding!
python-simple-sqlite 1.0.0
Библиотека для упрощенной работы с sqlite
Requires Python: >=3.10
Keywords: python sqlite sql

# python_simple_sqlite - Р‘РёР±Р»РёРѕС‚РµРєР° РґР»СЏ СѓРїСЂРѕС‰С‘РЅРЅРѕР№ СЂР°Р±РѕС‚С‹ СЃ sqlite

## РЈСЃС‚Р°РЅРѕРІРєР°:
`pip install python_simple_sqlite`

### РџСЂРёРјРµСЂС‹:

#### РЎРѕР·РґР°РЅРёРµ С‚Р°Р±Р»РёС†С‹
```py
from python_simple_sqlite.main import python_simple_sqlite
from python_simple_sqlite.const import *

my_database = python_simple_sqlite('test')
my_database.exists()                            #Р’РµСЂРЅС‘С‚ False
my_database.create_table(name=TEXT, phone=INT)  #РЎРѕР·РґР°СЃС‚ С‚Р°Р±Р»РёС†Сѓ
my_database.exists()                            #Р’РµСЂРЅС‘С‚ True
```
#### РЎРѕР·РґР°РЅРёРµ С‚Р°Р±Р»РёС†С‹
```py
from python_simple_sqlite.main import python_simple_sqlite
from python_simple_sqlite.const import *

my_database = simple_sqlite('test')
my_database.row_exist(name='РњР°СЂРє')          #Р’РµСЂРЅС‘С‚ False
my_database.add_row('РњР°СЂРє', 88005553535)    #РЎРѕР·РґР°С‘С‚ Р·Р°РїРёСЃСЊ, РІРµСЂРЅС‘С‚ True
my_database.get_rows()                      #Р’РµСЂРЅС‘С‚ ((1, 'РњР°СЂРє', 88005553535))
my_database.row_exist(name='РњР°СЂРє')          #Р’РµСЂРЅС‘С‚ True
```



## РћР±СЂР°С‚РЅР°СЏ СЃРІСЏР·СЊ:
### discord: .giperborei


## РЈРІРёР¶Сѓ Р°РєС‚РёРІРЅРѕСЃС‚СЊ СЌС‚РѕРіРѕ СЂРµРїРѕР·РёС‚РѕСЂРёСЏ - Р±СѓРґСѓ СЂРµРіСѓР»СЏСЂРЅРѕ РѕР±РЅРѕРІР»СЏС‚СЊ РµС‘. Р’ РїР»Р°РЅР°С… РїРѕРґРґРµСЂР¶РєР° СЂР°Р·РЅС‹С… РЎРЈР‘Р”, Р°СЃРёРЅС…СЂРѕРЅРЅРѕСЃС‚СЊ.