semvec/pypi-packages huggingface dataset:
dprop 0.42
Everything is connected, maan!
License: MIT
Requires Python: >=3.8

## dprop
#### *Everything is connected, maan!*

----------

This tiny package implements the notion of "dependent properties", whose values
are computed based on other properties and cached for re-use, but then smartly
invalidated when a `(great-)*(grand)?parent` property's value changes.

Here is a simple example:

```python
from dprop import independent, depends_on    

class Class:
    a = independent(float)  # type info optional

    @depends_on(a)
    def b(self):
        print('computing b')
        return 6 * self.a

    def __init__(self, a: float):
        # independent properties can be set inside and outside the class as usual
        self.a = a


inst = Class(7)
assert inst.a == 7
assert inst.b == 42  # prints "computing b"

assert inst.b == 42  # value is re-used! (nothing printed)


# Re-setting an independent property invalidates (does not actually delete,
# though) all "later" properties.
inst.a = 26/6
assert inst.b == 26  # prints "computing b"
```
InfixParser 3.1.4
Evaluate infix math expresion in python with ease.
License: MIT

# InfixParser

InfixParser is a Python binding for MathParser (https://github.com/KJ002/MathParser/). This module allows for a simple and quick evaluation of strings. It allows you to evaluate a string with security, you define the external variables!

## Examples

### Basic Eval
```py
result: float = InfixParser.evaluate("1+1") # returns 2.0
```

### Basic Eval (With Evaluator Class)
```py
evaluator = InfixParser.Evaluator()

result: float = evaluator.eval("1+1") # returns 2.0
```
### External Variable Eval
```py
evaluator = InfixParser.Evaluator()

x: int = 20

evaluator.append_variable("x", x)

result: float = evaluator.eval("1+x") # returns 21.0
```
### Updating External Variable Eval
```py
evaluator = InfixParser.Evaluator()

x: int = 20

evaluator.append_variable("x", x)

result1: float = evaluator.eval("1+x") # returns 21.0

x: int = 10

evaluator.append_variable("x", x)

result2: float = evaluator.eval("1+x") # returns 11.0
```
### Functions Eval
```py
"""
It is important to note that function do not have to
have to be called with in an instantiated class
and can just be called with InfixParser.evaluate()
"""

evaluator = InfixParser.Evaluator()

result: float = evaluator.eval("sin(1.5707963267948966)") # returns 1.0
```