semvec/pypi-packages huggingface dataset:
quick-xmltodict 0.1.3
Efficient XML-to-dict conversion backed by Rust
License: MIT
Requires Python: >=3.10
Keywords: xmltodict, xml-to-dict, xml, fast, rust

# quick-xmltodict

Efficient XML-to-dict conversion backed by Rust.

```python
>>> from quick_xmltodict import parse

>>> xml = """
... <movies>
...     <movie>
...         <title>Her</title>
...         <director>Spike Jonze</director>
...         <year>2013</year>
...         <genre>Science Fiction, Drama, Romance</genre>
...     </movie>
...     <movie>
...         <title>Encanto</title>
...         <director>Byron Howard, Jared Bush</director>
...         <year>2021</year>
...         <genre>Animation, Family, Fantasy</genre>
...     </movie>
... </movies>
... """

>>> parse(xml)

{'movies': {'movie': [{'director': 'Spike Jonze',
                       'genre': 'Science Fiction, Drama, Romance',
                       'title': 'Her',
                       'year': '2013'},
                      {'director': 'Byron Howard, Jared Bush',
                       'genre': 'Animation, Family, Fantasy',
                       'title': 'Encanto',
                       'year': '2021'}]}}
```

## Features

`quick-xmltodict` is a Rust-backed XML-to-dict conversion package designed to be fast and efficient.
It has a single function, `parse`, that takes an XML string and returns a Python dictionary.
You should be able to use this function as a drop-in replacement for the `xmltodict.parse` function from the original `xmltodict` package (used without any extra arguments).
Like `xmltodict`, `quick-xmltodict` follows [this](https://www.xml.com/pub/a/2006/05/31/converting-between-xml-and-json.html) schema for converting XML to JSON.

`quick-xmltodict` currently does not support namespace expansion, or the reverse operation (dict-to-XML conversion). For these features, use the original `xmltodict` package.

## Performance

Since `xmltodict` uses the non-validating C-based [expat](https://docs.python.org/3/library/pyexpat.html) parser from Python's standard library, it is already very fast.
`quick-xmltodict` is nonetheless about 2-5 times faster than `xmltodict`.

## Contributing

PRs are very welcome! Please make sure to run the tests before submitting a PR.

## Development

This project uses [uv](https://docs.astral.sh/uv/) to manage the environment and Python dependencies,
so you'll need to have it installed in addition to Python and Rust.

To install the development environment and run the test suite:
```bash
uv sync
uv run maturin develop --uv
uv run pytest
```

Be sure to run `uv run maturin develop --uv` after making changes to the Rust code.
Add the `-r` flag for a release build (for example, if you want to run benchmarks).

It's recommended to install the pre-commit hooks:
```bash
uv run pre-commit install
```

This ensures that linting and formatting are run automatically on every commit.
blockcoins 0.2.1
A bot to automatically farm BlockCoins on blockcoin.vercel.app
License: MIT

# BlockCoins

![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/uukelele-scratch/blockcoin/publish.yml)
![GitHub Issues or Pull Requests](https://img.shields.io/github/issues/uukelele-scratch/blockcoin)
![GitHub Issues or Pull Requests](https://img.shields.io/github/issues-pr/uukelele-scratch/blockcoin)
![PyPI - License](https://img.shields.io/pypi/l/blockcoin)
![GitHub Repo stars](https://img.shields.io/github/stars/uukelele-scratch/blockcoin)
![PyPI - Version](https://img.shields.io/pypi/v/blockcoin)

Automate BlockCoin farming on https://blockcoin.vercel.app with ease.

## 📦 Installation

```bash
pip install blockcoins
```

## 🚀 Features

- Multi-threaded automated post creation
- Automatic liking of posts (two like methods)
- Target-based coin farming
- Thread-safe logging of created posts
- Graceful error handling and recovery
- Real-time stats on earnings and performance

## 🔧 Usage

```python
from blockcoin import BlockCoinFarm

# Your login credentials
username = "your_username"
password = "your_password"

# Initialize the farming bot
farm = login(username, password)

# Post contents and prices
texts = ["Farming blockcoins!", "Let's go!", "Boost me up!"]
prices = [1, 2, 3, 4, 5]

# Start farming
stats = farm.get_blockcoins(
    post_texts=texts,
    prices=prices,
    thread_count=3,
    amount_of_blockcoins=100,
    like=1  # like method: 1 = raw request, 2 = API method
)

# Print results
print(stats)
```

## ⚙️ Class: BlockCoinFarm

### __init__(username, password)
Initializes the bot with your login details.

### login()
Logs into blockcoin.vercel.app and stores the session.

### get_blockcoins(post_texts, prices, thread_count=1, amount_of_blockcoins=None, like=1)
Starts the farming process.

Arguments:
- post_texts: List of text strings to be posted
- prices: List of prices for the posts
- thread_count: Number of concurrent threads (default 1)
- amount_of_blockcoins: Stop when target is reached (optional)
- like: Liking method (1 = raw HTTP, 2 = API-based)

Returns a dictionary with:
- initial_balance
- final_balance
- coins_earned
- target_reached (True/False)
- time_took (formatted time string)
- posts_created (int)
- average_price (float)
- coins_per_minute (float)
- like_method_used (int)
- details (list of created post dicts)

## 🧠 Notes

- Threaded execution ensures high performance farming.
- If a thread encounters a "No `const data = [`" error, it will retry intelligently.
- You can stop the farming process anytime with Ctrl+C.
- The like method is optional — use `like=2` if the default fails.

## 🛠 Example Output

{
    'initial_balance': 50,
    'final_balance': 150,
    'coins_earned': 100,
    'target_reached': True,
    'time_took': '0:01:32.141245',
    'posts_created': 48,
    'average_price': 2.3,
    'coins_per_minute': 65.21,
    'like_method_used': 1,
    'details': [...]
}

## 💬 Support

Issues or questions? Hit up the dev or open an issue on the GitHub repo.