semvec/pypi-packages huggingface dataset:
barbthroat 0.1.2
A library to help write directional strategies for Hummingbot.
License: MIT
Requires Python: >=3.8,<4.0

# 🐦barbthroat

[![PyPI Downloads](https://img.shields.io/pypi/v/barbthroat.svg?label=PyPI)](
https://pypi.org/project/barbthroat/)

A library to help write directional strategies for [Hummingbot](https://hummingbot.org/).
Restocks-client 0.1.0
Restocks.net client for Python
License: MIT
Keywords: python,client

# Installation
```
pip install restocks
```

# Introduction
You can search for products without being logged in, however, there are some client methods which require you to be logged in to your Restocks.net account to be used.

You can either use the client with or without proxies. Proxies will rotate for each client call for those methods which do not require login. The same proxy will be used for all the client calls after you log in if you decide to do so.

| Method  | Description | Login |
| ------------- | ------------- | :-------------: |
| `search_products`  | Searches for products. | :x: |
| `get_product`  | Gets all the data of an specific product. | :x: |
| `get_size_lowest_price` | Gets the lowest price of a products size. | :white_check_mark: |
| `get_sales_history` | Gets the account sold products. | :white_check_mark: |
| `get_listings_history` | Gets the account current product listings. | :white_check_mark: |
| `list_product` | Lists a product for sale. | :white_check_mark: |
| `edit_listing` | Edits a product listing. | :white_check_mark: |
| `delete_listing` | Deletes a product listing. | :white_check_mark: |

# Example

```python
from restocks.client import Client
from restocks.filters import SellMethod, ListingDuration


proxy = {"https": "https://username:password@ip:port"} 
# or optionally
proxy = [{"https": "https://username:password@ip:port"}, {"https": "https://username:password@ip:port"}]

client = Client(proxy=proxy)


# ---- Get product data ---------------------- #

product = client.get_product("DD1391-100")

print(product.name, product.sku)

# -------------------------------------------- #


# ---- Log in to your Restocks.net account --- #

username = "YOUR_USERNAME"
password = "YOUR_PASSWORD"

client.login(username, password)

# -------------------------------------------- #


# ---- Get the account sales ----------------- #

sales = client.get_sales_history()

for sale in sales:
    
    print(sale.name, sale.price, sale.date)
    
# -------------------------------------------- #


# ---- List a product for sale --------------- #

listed = client.list_product(
    product=product, # DD1391-100
    store_price=3000,
    size="42",
    sell_method=SellMethod.Resell,
    duration=ListingDuration.Days60
)

print(listed)

# -------------------------------------------- #
```