semvec/pypi-packages huggingface dataset:
tableclasses 0.1.1rc2
Dataclasses for tabular data
Requires Python: >=3.10

# tableclasses

[![Code Coverage](https://img.shields.io/codecov/c/github/joshua-auchincloss/spic?style=flat-square)](https://app.codecov.io/github/joshua-auchincloss/tableclasses)
[![PyPI - Version](https://img.shields.io/pypi/v/tableclasses.svg)](https://pypi.org/project/tableclasses)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/tableclasses.svg)](https://pypi.org/project/tableclasses)

---

**Table of Contents**

- [Installation](#installation)
- [License](#license)

## Installation

```console
pip install tableclasses
```

## License

`tableclasses` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
graphs-for-science 0.0.1
A package for graphing beautiful datasets and fit curves.
Requires Python: >=3.9

# graphs-for-data-analysis

### Colori matplotlib per grafici

---

<img width="704" alt="colors" src="https://github.com/lmarchetti02/graphs-for-data-analysis/assets/90146345/17c94f95-7054-47dc-9e9f-8ade52ed6390">
extclass 1.0.0
A Python approach for class extensions like C# and Kotlin
Requires Python: >=3.8

# Ext-Class
Adding fields/methods to existing classes. 

A Python approach to the great `extensions` feature in C# and Kotlin, and probably the closest.

## How to use
```
pip install extclass 
```
Suppose you have a `Person` class in an already installed package:
```python
from dataclasses import dataclass

@dataclass
class Person:
    first_name: str
    last_name: str
```
Then, you could add an extra method outside the source package somewhere in your project.
```python
from extclass import extension

@extension
class PersonExt(Person):
    age: int = 10

    def full_name(self):
        return f'{self.first_name} {self.last_name}'
```
With the help of the `@extension` decorator, new field `age` and `full_name` are added to the origin `Person` class. You can just call them as usual.
```python
if __name__ == '__main__':
    person = Person(first_name='rick', last_name='sanchez')
    print(person.full_name())
    print(person.age)
```
which print as
```text
rick sanchez
10
```
However, the IDE cannot know the dynamic informations of the added attributes, so there would be a warning message:
```text
Unresolved attribute reference 'full_name' for class 'Person' 
```
And no autocomplete for the attributes in the IDE.

To handle the warnings also enabling autocomplete, you can simply `typing.cast` the origin object to the new extended type.
```python
from typing import cast

person = cast(PersonExt, person)
```
In this case, `person` is still the old object but only marked as the extended type in order to cheat the IDE for better programming experiences.

### No Override
Same method/field name in the extending class will not affect the origin class. So this package is very safe in any use-cases.

### Pydantic issues
Classes of `pydantic.BaseModel` can only attach new methods. Dynamic fields are internally forbidden by the pydantic package. So please do **NOT** extend fields for pydantic models, or an `AttributeError` would be raised during runtime.

### Full examples
See [test.py](tests/test.py)
pyofwar 1.0.0
Python module for Sun Tzu's most popular quotes
Requires Python: >=3.7

# pyofwar
Python library for Sun Tzu's most popular quotes

Most of the quotes were taken from the website [quotefancy](https://quotefancy.com/sun-tzu-quotes)

### Selected quotes
```python
from pyofwar import pow

print("Sun Tzu once said...")
print(pow.quote(1, True))
```
outputs
```
Sun Tzu once said...
"Let your plans be dark and impenetrable as night, and when you move, fall like a thunderbolt."
```
### Random quotes

```python
from pyofwar import pow

print("Sun Tzu once said...")
print(pow.quote_random(2, False))
```
outputs
```
Sun Tzu once said...
Know thy self, know thy enemy.
If their forces are substantial, prepare for them; if their forces are strong, avoid them.
```

And if you want to limit the range of randomness

```python
from pyofwar import pow

print("Sun Tzu once said...")
print(pow.quote_random(3, True, 0, 0))
```

outputs
```
Sun Tzu once said...
"Let your plans be dark and impenetrable as night, and when you move, fall like a thunderbolt."
"Let your plans be dark and impenetrable as night, and when you move, fall like a thunderbolt."
"Let your plans be dark and impenetrable as night, and when you move, fall like a thunderbolt."
```