semvec/pypi-packages huggingface dataset:
base26 1.0.5
Package implements base26 encoding/decoding algorithm.
License: MIT
Requires Python: >=3.8

# base26

[![PyPI](https://img.shields.io/pypi/v/base26)](https://pypi.org/project/base26/)

This library provides functions for encoding binary data to printable ASCII
characters and decoding such encodings back to binary data.
The algorithm is Base26.

Base26 encoding takes binary data (a byte array) and converts it into a stream
of letters, drawn from a 26-character pool in capital letters,
e.g. byte arrays of 0xA5, 0x05, 0x4B = Base26 encoded value of "TDTTKA".

Decoding is the reverse of encoding, taking a string of capital letters
and turning it back into a byte array. The Base26 decoding algorithm
may add an extra 0 byte at the end of the returned payload. The algorithm
should check for this: typically, if the returned payload size is 129
and if it is equal to 0 remove it.

It's similar to Base64 but with a smaller pool of characters.

```text
Base64 = ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/
Base26 = ABCDEFGHIJKLMNOPQRSTUVWXYZ
```

## Development

Install dependencies

```sh
python -m pip install pip-tools
pip-compile --extra dev pyproject.toml
pip-sync
```

Install base26 package in editable mode

```sh
python -m pip install -e .
```

Run tests

```sh
pytest tests
```
sandclock 0.1.3
A decorator for examining the execution time of asynchronous/synonymous function.
License: MIT
Requires Python: >=3.8,<4.0

##### Basic Usage
A decorator for measuring asynchronous/synchronous function execution time (in seconds) is offered by this Python module.
- 1st parameter: total number of iterations of the function. defaults to 1.
- 2nd parameter: (int, optional): precision of execution time in seconds. defaults to 5.
- 3rd parameter: (bool, optional): whether each function execution time is printed. defaults to true.

##### Example 1: synonymous function
```python
from sandclock import sandclock
@sandclock(3) #execute f1() 3 times.
def f1(x):
    print("f1: ", x)

f1("hello world")

```
Results:
```
Sandclock: synchronous <function f1 at 0x7f89eaca7e50> with args ('hello world',) {}
Sandclock: iteration: 0 started, <function f1 at 0x7f89eaca7e50> with args ('hello world',) {}
f1:  hello world
Sandclock: iteration: 0 finished, <function f1 at 0x7f89eaca7e50> in 0.000823 second(s)
Sandclock: iteration: 1 started, <function f1 at 0x7f89eaca7e50> with args ('hello world',) {}
f1:  hello world
Sandclock: iteration: 1 finished, <function f1 at 0x7f89eaca7e50> in 0.000075 second(s)
Sandclock: iteration: 2 started, <function f1 at 0x7f89eaca7e50> with args ('hello world',) {}
f1:  hello world
Sandclock: iteration: 2 finished, <function f1 at 0x7f89eaca7e50> in 0.000151 second(s)
Sandclock: total time: 0.001050, total iterations: 3```
```
##### Example 2: (Asynchronous function)
```python
import aiohttp
import asyncio
from sandclock import sandclock


async def status(session: aiohttp.ClientSession, url: str) -> int:
    async with session.get(url) as result:
        return result.status

#execute f2() 2 times, 3 precisions, printing details of each function call.
@sandclock(2, 3, True)
async def f2():
    async with aiohttp.ClientSession() as session:
        urls = ['https://google.com', 'xxx://bad-request.com']
        tasks = [status(session, url) for url in urls]
        results = await asyncio.gather(*tasks, return_exceptions=True)

        exceptions = [res for res in results if isinstance(res, Exception)]
        successful_results = [res for res in results if not isinstance(res, Exception)]

        print(f'All results: {results}')
        print(f'Finished successfully: {successful_results}')
        print(f'Threw exceptions: {exceptions}')

asyncio.run(f2())
```
Results:
```
Sandclock: coroutine <function f2 at 0x7f632fd3e430> with args () {}
Sandclock: iteration: 0 started, <function f2 at 0x7f632fd3e430> with args () {}
All results: [200, AssertionError()]
Finished successfully: [200]
Threw exceptions: [AssertionError()]
Sandclock: iteration: 0 finished, <function f2 at 0x7f632fd3e430> in 2.400 second(s)
Sandclock: iteration: 1 started, <function f2 at 0x7f632fd3e430> with args () {}
All results: [200, AssertionError()]
Finished successfully: [200]
Threw exceptions: [AssertionError()]
Sandclock: iteration: 1 finished, <function f2 at 0x7f632fd3e430> in 2.385 second(s)
Sandclock: total time: 4.785 second(s), total iterations: 2
```
magic-eden-py 0.0.9
Python wrap for api solana NFT marketplace MagicEden
License: MIT

# Python wrap for api solana NFT marketplace MagicEden

```pip install magic-eden-py```

#### Api classes have methods corresponded to endpoints from official [docs](https://api.magiceden.dev/)


## How to use?

1. Import api class
2. Create class instance
3. Use methods of class

### Important

##### Method ended with ```_dirty``` its clear answer from marketplace

##### Other methods, contain processed data and correspond to type annotations

### Constructor of api class parameters

```environment```:

- description: Define environment for api (api-devnet.magiceden.dev, api-mainnet.magiceden.dev)
- values: 'MAINNET' | 'DEVNET'
- default: 'MAINNET'

```request_kwargs```:

- description: For make requests used python [requests](https://pypi.org/project/requests/) package,
  its parameter for add additional kwargs to requests
- values: dict
- default: ```{'headers': {'ME-Pub-API-Metadata': '{"paging":true}'}}```

```
>>> wallet_api = MagicEdenWalletsApi(
        environment = 'DEVNENT'
        requests_kwargs: dict = None
      )
```

### Also api class instance have ```request``` attribute with last request instance


## Example

```
>>> from magic_eden.api import MagicEdenCollectionsApi

>>> magic_eden_api = MagicEdenCollectionsApi()

>>> collections = magic_eden_api.collections()

>>> magic_eden_api.request   
<Response [200]>

```

### You can also import types for annotation

```
>>> from magic_eden.api.utils.types import MECollectionInfo
>>> from typings import List

>>> collections: List[MECollectionInfo] = []
```

### Official MagicEden api python wrapper classes

```
>>> from magic_eden.api import (
  MagicEdenTokensApi, 
  MagicEdenWalletsApi, 
  MagicEdenCollectionsApi, 
  MagicEdenLaunchpadApi
)  
```



```python setup.py sdist```
```twine upload dist/*```