semvec/pypi-packages huggingface dataset:
ducoapi 0.0.2
Duino-Coin Mining library for Python.
Requires Python: >=3.6

## Official DUCO module for Python 3

To build your own Duino-Coin apps we've created Duino-Coin API for Python 3.

Created by Connorhess, maintained by Alicia426

<h3>Getting Started</h3>

```python
import ducoapi
```

Initialize the connection to the server

```python
api_connection = ducoapi.api_actions() #creates the api connection instance
```

The next step is to Login/Register <i>*Note: login and register do not require you to init but they close the connection after use*</i>
<h4>Login</h4>

```python
api_connection.login(username="username", password="password")
```

<h4>Register</h4>

```python
api_connection.register(username="username", password="password", email="user@example.com")
```

<h3>Functions</h3>
These functions require user being loged-in.

<h4>Balance</h4>
Gets the current balance of the logged-in user

```python
api_connection.balance() # takes no args
```

<h4>Transfer</h4>
Transfers Duco from logged-in user to the specified username

```python
api_connection.transfer(recipient_username='test_user1', amount=1)
```

<h4>reset password</h4>
Resets the password of the logged-in user

```python
api_connection.reset_pass(old_password='123', new_password='abc')
```

<h4>Get Latests Transactions</h4>
Get the latests transactions

```python
api_connection.getTransactions(7) # 7 is the number of transactions to get
# returns JSON
```

<h3>Other Functions</h3>
Use of this functions does not require being loged-in.

<h4>Get Duco Price</h4>
returns the current Duco price as a float

```python
>>> ducoapi.get_duco_price() 
0.01249
```

<h4>Duco price update timer</h4>
starts a timer that updates the price at a specified interval in seconds (default is 15)

```python
>>> ducoapi.start_duco_price_timer(interval = 5) # start the timer that updates the price every 5 seconds
>>> ducoapi.duco_price # you can get the updated price from a global variable <duco_price>
0.01249
```

<h4>Example API script</h4>

```python
import ducoapi

api_connection = ducoapi.api_actions()

api_connection.login(username='YourUsername', password='YourPassword')

current_balance = api_connection.balance()
print(current_balance)

api_connection.close()
```
pymacro 0.1.1
PyMacro can automate your tasks inside of Python.

# pymacro
[![Image](https://img.shields.io/pypi/v/pymacro)](https://pypi.org/project/pymacro/)

PyMacro is a partial wrapper around [pyautogui](https://pypi.org/project/PyAutoGUI/). PyMacro can automate your tasks all inside of Python - give it a try!
## Features
- Object oriented
- Extra utility functions
- Asynchronous support 
## Installation
PyMacro can be easily downloaded with PIP:
```
pip install pymacro
```
You can install the latest version from this repository, too:
```
pip install git+https://github.com/jay3332/PyMacro
```
## Example Usage
### Basic Usage
```py
from pymacro import Macro

macro = Macro()
macro.type("Hello, world!", interval=.15)

macro(wait=2)
```
### Mouse/keyboard Macros
```py
from pymacro import Macro

macro = Macro()
macro.move_mouse_relative((0, 50), seconds=0.5)
macro.click()
macro.key_press("enter")

macro(wait=0.5)
```
### Repeat Macro Indefinitely
```py 
from pymacro import Macro

macro = Macro()
macro.click()

macro(wait=0.5, repeat=0, delay=0.1)

# Wait 0.5 seconds before starting the macro.
# Repeating 0 times tells pymacro to repeat this macro forever without end.
# Delay of 0.1 means to wait 0.1 seconds between every iteration of the loop.
```
### Async Usage
```py
import asyncio
from pymacro import Macro

macro = Macro()
macro.type("Hello, world!", interval=.15)

async def run_macro():
    await macro.async_run(wait=2)

asyncio.run(run_macro())
```
### Executing Functions
```py
from pymacro import Macro

def fn():
    print("This function is running.")

macro = Macro()
macro.execute(fn, times=5)  # execute this function 5 times 

macro()
```
## Multi-tasking
Because PyMacro has asynchrounous support, it is possible to run two macros at once in the same program.
### Multiple Macros at once (asyncio)
```py
import pymacro
import asyncio

macro1 = pymacro.Macro()
macro2 = pymacro.Macro()

def print_one_to_ten():
    for i in range(1, 11):
        print(i)

macro1.execute(print_one_to_ten)
macro2.execute(print_one_to_ten)

loop = asyncio.get_event_loop()
loop.create_task(macro1.async_run())
loop.create_task(macro2.async_run())
```
### Multiple Macros at once (threading)
âš  This is not recommended - use asyncio if possible.
```py 
import pymacro
import threading

macro1 = pymacro.Macro()
macro2 = pymacro.Macro()

def print_one_to_ten():
    for i in range(1, 11):
        print(i)

macro1.execute(print_one_to_ten)
macro2.execute(print_one_to_ten)

runner1 = threading.Thread(target=macro1.run)
runner2 = threading.Thread(target=macro2.run)

runner1.start()
runner2.start()
```
## Tips
### Special Functions
```py
import pymacro
macro = pymacro.Macro()

# Functions
macro.execute(function, times=1, interval=0, *args, **kwargs)

# End the macro early 
macro.end(condition=True, wait=0)

macro()
```