semvec/pypi-packages huggingface dataset:
polymethod 1.0.0
Library to enable function overloading in Python
License: MIT
Requires Python: >=3.8

Introduction
------------

This library is enables method overloading in Python
taking care of the method resolution without additional user required code
given sufficient typehints on the various functions.
It brings no additional requirements and can be easily integrated into existing
codebases.

License and Copyright Information
---------------------------------

This library is distributed under the MIT License, see ``LICENSE``.

Installation
------------

This project has no dependencies and can be installed with pip either locally

.. code-block:: bash

   git clone https://github.com/steinmig/polymethod.git
   pip install ./polymethod

or from PyPI

.. code-block:: bash

   pip install polymethod


Building documentation
----------------------

The dependencies for building the documentation can be installed with

.. code-block:: bash

   pip install -r docs/requirements.txt

The documentation can then be built and opened with

.. code-block:: bash

   sphinx-build docs/source docs/build
   firefox docs/build/index.html


Example Usage
-------------

This package allows you to overload functions, i.e. give multiple functions the same name,
but let them require different number and/or types of arguments.
This allows to provide simple APIs that can handle various inputs.
Currently, the overloading feature is limited to methods, i.e. functions of a class.
The overloaded methods can be regular methods, classmethods, or staticmethods.
An example class would be

.. code-block:: python

   from polymethod import overload, OverloadMeta, NoMatchingOverload
   from typing import Tuple

   class API(metaclass=OverloadMeta):

       @classmethod
       @overload
       def provide_id(cls, user_name: str) -> int:
           # some function body
           return 0

       @classmethod
       @overload
       def provide_id(cls, birthday: Tuple[int, int, int]) -> int:
           # another function body
           return 1

   assert API.provide_id("A user name") == 0
   assert API.provide_id((4, 7, 1776)) == 1
   try:
       API.provide_id(0)
   except NoMatchingOverload as e:
       print(str(e))
panars 0.1.2
Default template for PDM package
License: MIT
Requires Python: ==3.12.*

# panars: Polars with Pandas-like Interface

Panars is a powerful wrapper that brings the familiar Pandas API to Polars, combining the best of both worlds: Polars' speed and efficiency with Pandas' user-friendly interface.

## Key Features

- **Pandas-like API**: Use Polars with syntax you already know from Pandas.
- **High Performance**: Leverage Polars' speed while writing Pandas-style code.
- **Easy Migration**: Seamlessly transition existing Pandas code to Polars.
- **Best of Both Worlds**: Combine Pandas' ease of use with Polars' efficiency.

## Installation

```bash
pip install panars
```

## Quick Start

```python
import panars as pa

# Create a DataFrame
df = pa.DataFrame({
    "A": [1, 2, 3, 4],
    "B": [5, 6, 7, 8],
    "C": [1, 1, 2, 2]
})

# Familiar Pandas operations
print(df.head())
print(df.groupby("C").sum())
print(df.filter(df["A"] > 2))

# Efficient data manipulation
result = (df.groupby(["C"])
            .agg({"A": ["mean", "sum"], "B": ["min", "max"]})
            .sort_values("C"))
print(result)
```

## Why panars?

1. **Familiar Syntax**: Write Polars code using Pandas conventions you already know.
2. **Performance Boost**: Gain Polars' speed advantages without learning a new API.
3. **Gradual Migration**: Easily port existing Pandas projects to Polars over time.
4. **Community-Driven**: Open-source project welcoming contributions and feedback.

## Documentation

For detailed usage instructions and API reference, visit our [documentation](https://github.com/milisp/panars/wiki).

## Contributing

We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for more details.

## License

Panars is released under the MIT License. See the [LICENSE](LICENSE) file for details.