semvec/pypi-packages huggingface dataset:
audius-py 0.1.6
Interact with the Audius platform in Python and the terminal
License: Apache-2.0
Requires Python: <4,>=3.9
Keywords: audius

# audius-py

A Python SDK and CLI for the Audius Platform.

## Installation

From pip:

```shell
pip install audius-py
```

From source (from the root project directory):

```shell
pip install .
```

**NOTE**: In order to user the media player functionality of the SDK, you must have [VLC media player](https://www.videolan.org/vlc/) installed.

## Quick Usage

Play a random song from Audius!

```shell
audius play
```

## In-Depth Usage

To create an `audius` SDK instance, do:

```python
from audius import Audius

audius = Audius()
```

It is recommended that you set a custom app name (the default is `audius-py`).

```python
audius = Audius("My_Audius_App")
```

You can also use an environment:

```shell
export AUDIUS_APP_NAME="My_Audius_App"
```

And when you initialize without any arguments like `Audius()`, it will use the environment variable.

You can also specify a `Config` option where you can set more config than `app_name`:

```python
from audius.config import Config
from audius.sdk import Audius

config = Config(app_name="my_app", host="https://audius.example.com")
sdk = Audius(config)
```

The Audius host name is also configurable as an environment variable:

```shell
export AUDIUS_HOST_NAME="https://audius.example.com"
```

or:

```python
from audius.config import Config

Config(host="https://audius.exmaple.com")
```

If you don't specify a host, `audius-py` will select a random host from the list of known hosts to the Audius app.
To see all available hosts, run the following command:

```shell
audius hosts
```

### CLI

See all commands by doing:

```shell
audius --help
```

This guide will show how to stream one of the top songs on Audius directly into your terminal.
First, browse top artists using the CLI:

```shell
audius users top
```

It should show output like this:

```shell
1: Zedd (id=XlJby)
2: Skrillex (id=eAZl3)
3: Aluna (id=5j9VM)
4: kennybeats (id=DrZwG)
5: trillsammy (id=NzMW8)
6: ODESZA (id=2oNg1)
7: noodles (id=b9w8J)
8: kayzo (id=LMdyZ)
9: Disclosure (id=E2O1R)
10: Fat Nick (id=oGKZd)
```

Next, select one of the user IDs by copying it and using it in the following command:

```shell
audius users tracks eAZl3
```

It should output track information like this:

```shell
Track: Kliptown Empyrean (id=G0wyE)
```

Finally, play the track by using its ID in the following command:

```shell
audius tracks play G0wyE
```

The song should now be streaming into your terminal!
And if you really enjoy the track, you can download it by doing:

```shell
audius tracks download G0wyE song.mp3
```

By default, `audius-py` tries to find the best player.
However, specify your player of choice using the `--player` flag:

```shell
audius tracks play G0wyE --player vlc
```

### Python SDK

Use the Python SDK directly:

```python
from audius.sdk import Audius

sdk = Audius(app="my_app")
for artist in sdk.users.top():
    print(artist["name"])
```
mbn 1.0.16
A binary encoding library designed for efficient data storage and transportation in trading platforms.
License: Apache-2.0
Requires Python: >=3.8
Keywords: midas, binary-encoding, protocol-buffers

# Midas Binary Encoding (MBN)

[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)

## Disclaimer

The Midas Binary Encoding (MBN) library is heavily inspired by and directly influenced by the [Databento DBN](https://github.com/databento/dbn) library. When starting this project, I was new to Rust and binary encoding, and much of the initial development was based on learning from and building upon Databento's DBN implementation. While MBN will continue to evolve into its own implementation, it is important to acknowledge the foundational inspiration provided by Databento's work.

## Overview

The Midas Binary Encoding (MBN) library is a foundational component of the Midas ecosystem. It serves as the shared protocol for encoding and decoding data across all Midas system components. Although users typically do not interact with MBN directly, it plays a crucial role in ensuring seamless data exchange between:

- **Midas Server**: Data storage and API backend.
- **MidasTrader**: Core backtesting and live trading engine.
- **Midas Shell**: Command-line and REPL interface.
- **Midas GUI**: Frontend visualization and analysis.

MBN functions similarly to protocol buffers, providing a structured and efficient binary format for data serialization and deserialization.

## Installation

### Rust Installation

Add MBN to your Rust project's `Cargo.toml`:

```toml
[dependencies]
mbn = { git = "https://github.com/midassystems/mbn.git", branch = "main" }
```

### Python Installation

For Python, MBN must be installed from source:

1. Clone the repository:

   ```bash
   git clone https://github.com/midassystems/mbn.git
   cd mbn/mbn_python
   ```

2. Install dependencies:

   ```bash
   pip install -r requirements.txt
   ```

3. Build the package:

   ```bash
   ./test.sh
   ```

   \*\*Select build when prompted

4. Navigate to the desired installation location and install the built package:
   ```bash
   cd mbn/mbn_python
   pip install dist/*.whl
   ```

## Future Plans

- Extend schema support for additional data types.
- Optimize encoding and decoding for larger datasets.

## Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request with suggestions or improvements.

## License

This project is licensed under the Apache 2.0 License. See the [LICENSE](LICENSE) file for details.