semvec/pypi-packages huggingface dataset:
TradeGates 0.3.9
A Trading Gateway
Requires Python: >=3.6

# Trade Gate

<div align="center">

![PyPI](https://img.shields.io/pypi/v/TradeGate?style=flat-square)
![PyPI - Downloads](https://img.shields.io/pypi/dm/TradeGate)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/TradeGate?style=flat-square)
![GitHub](https://img.shields.io/github/license/rastins/tradegate?style=flat-square)

</div>

An algorithmic trading library to use as a gateway to different exchanges.

## Documentations and examples

Documentations are available on [read the docs](https://tradegate.readthedocs.io), but currently it's not complete.
Examples for each exchange will be added soon, until then, there are good examples in the Test folder.

## How to install

Use this Github repository by running ```python setup.py install```, or using pip:

```bash
pip install TradeGate
```

## How to use

Use with a config file in JSON format. Your config file should look like this:

```json
{
  "Binance": {
    "exchangeName": "Binance",
    "credentials": {
      "main": {
        "futures": {
          "key": "API-KEY",
          "secret": "API-SECRET"
        },
        "spot": {
          "key": "API-KEY",
          "secret": "API-SECRET"
        }
      },
      "test": {
        "futures": {
          "key": "API-KEY",
          "secret": "API-SECRET"
        },
        "spot": {
          "key": "API-KEY",
          "secret": "API-SECRET"
        }
      }
    }
  }
}
```

You should read this config file as JSON and give the desired exchange information to the main class initializer. Use
sandbox argument to connect to the testnets of exchanges (if it exists). This is shown below:

```python
from TradeGate import TradeGate
import json

with open('/path/to/config/file.json') as f:
    config = json.load(f)

gate = TradeGate(config['Binance'], sandbox=True)

print(gate.get_symbol_ticker_price('BTCUSDT'))
```

## Current Supported Exchanges

- Binance
- ByBit
- KuCoin

## Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. The
best way to contribute right now is to implement as many exchanges as possible. Make sure all test cases are passing.

## License

[MIT](https://choosealicense.com/licenses/mit/)
psycopg-dbconn-class 0.0.2
A simple class to handle database connections using psycopg2 (PostgreSQL)
Requires Python: >=3.9

## psycopg_dbconn_class

A simple class to handle database connections using [psycopg2](https://www.psycopg.org/docs/) (PostgreSQL).

### Use

To properly use this class, just get it from [PyPI](https://pypi.org/project/psycopg-dbconn-class/).

```shell
pip install psycopg-dbconn-class 
```

Alternatively, you can also clone it from the _GitHub_ repository and install manually.

```shell
git clone https://github.com/kstenio/psycopg_dbconn_class.git
cd psycopg_dbconn_class
pip install -r requirements.txt
pip install . 
```

Then, you can create an object, connect to a server and begin running queries.
By default, parameters for connecting into the server are expected do be in environment variables 
('DBN', 'DBU', 'DBK', 'DBH', 'DBP'), but you can also use a json file (_conn.json_). Finally, 
you may also enter parameters manually.

```python
from psycopg_dbconn_class import DataBaseConnection

DB = DataBaseConnection(auto_config=False)
DB.update_config_values(name='db', host='127.0.0.0', port="15432", user="postgres", password="PostgresPass")
DB.connect()

if DB.connected:
	# For queries without need of return
	DB.run_query('INSERT INTO colum VALUES (NULL)')
	DB.run_query('INSERT INTO colum VALUES (%s)', [1])
	# For queries that need the return
	result = DB.run_read_query('SELECT * FROM table WHERE val = %s', [2], fetch_all=True)
	print(result)

DB.close()
```

### Development background

When I've started to work with Python + PostgreSQL, I have begun using the pysycopg2
library. However, I do prefer working with classes, and the usual connection/cursor
methods were not very functional for my applications.

Eventually, I decided to structure the objects I needed inside a **DataBaseConnection**
class, and created this repository for further improvements.

### Warranty

**psycopg_dbconn_class** is an open-source project. It is distributed in the hope that it will be
useful, but *WITHOUT ANY WARRANTY*; without even the implied warranty of *MERCHANTABILITY*
or *FITNESS FOR A PARTICULAR PURPOSE*. See the GNU Lesser General Public License
version 3 attached for more details.

---

Developed by: [Kleydson Stenio](mailto:kleydson.stenio@gmail.com?Subject=psycopg_dbconn_class_QUESTIONS) @ 2023
salestax 1.0.0
Get Sales Tax Rates. Currently only supports Arkansas (because that is the only one I need) but I am open to pull requests for other states.
Requires Python: >=3.9

# salestax-python
Python module for gathering sales tax rates
Currently only supports Arkansas. Feel free to submit a pull request to help add other states.

```
from salestax import Arkansas as ar

ar.get("700 W Walnut St", "Rogers", "72756")

{'taxable_state': 'Arkansas', 'state_tax_rate': '6.5%', 'is_state_taxable': True, 'taxable_county': 'Benton', 'county_tax_rate': '1%', 'is_county_taxable': True, 'taxable_city': 'Rogers', 'city_tax_rate': '2%', 'is_city_taxable': True}
```
divert 0.1.0
Divert the execution flow.
Requires Python: >=3.10
Keywords: execution,flow,divert

# Divert

Divert the execution flow of your code.
This is useful for complex code with lots of method nesting and unpredictable return values.

Plus, no sub-dependencies.

## Example usage

For example, if we have an inner function (or multiple), we can immediately divert to a flow edge of our choice.

```python
from divert.flow import custom_flow_edge, divert


def inner_function(number: int) -> int:
    """Function that doubles the value or signals that the flow should change."""
    if number == 4:  # Stop condition for sake of example
        divert()  # If we want to specify the return value here we can instead use `payload_to_edge(VALUE)`

    return number * 2


@custom_flow_edge(default_return=42)
def outer_function() -> int:
    """Larger function that calls the inner function multiple times."""
    first_response = inner_function(2)
    second_response = inner_function(4)
    third_response = inner_function(8)

    return first_response + second_response + third_response
```

For further motivation for using the library, see [the documentation](examples/motivation.md).
For example usage, see [the examples](examples/).
webxdcbot 0.1.0
Example Delta Chat bot + webxdc app
Requires Python: >=3.8
Keywords: deltachat,bot

# webxdcbot

Example Delta Chat bot + webxdc app as bot's frontend.

## Install

Clone this repository and run inside the project's folder:

```sh
# first build the webxdc app / frontend:
cd frontend/
npm install
npm run build
cd ..
# install the python package bot / backend:
pip install .
```

### Installing deltachat-rpc-server

This program depends on a standalone Delta Chat RPC server `deltachat-rpc-server` program that must be
available in your `PATH`. To install it check:
https://github.com/deltachat/deltachat-core-rust/tree/master/deltachat-rpc-server

## Configuration

Configure the bot:

```sh
webxdcbot init bot@example.com PASSWORD
```

Start the bot:

```sh
webxdcbot serve
```

Run `webxdcbot --help` to see all available options.

## Usage

1. Write to the bot in Delta Chat, for example send a "hi" message to it
2. The bot will reply with the webxdc app
3. Open the webxdc app and send a message there
4. The bot will reply to you inside the app