polimer
polimer is an automated callstack synthesis framework (based on annotations)
Basic idea
- Define annotations based on payload id (not just type id)
- e.g.
l: 'price_list'insead ofl: list
- e.g.
- Automatically invoke argument initializers based on payload id
- e.g. call
def get_price_list() -> 'price_list'
- e.g. call
- Simplify end-user code
Quick-demo
- Install polimer
pip install polimer
- Annotate your methods with payload ids:
prices.py
import random
def get_prices(length=10) -> 'price_list':
return [random.random() for _ in range(length)]
def calc_avg_price(p: 'price_list'):
return sum(p) / len(p)
- Import your entrypoints via polimer
demo.py
from prices import *
from polimer import prices
print(prices.calc_avg_price())
Metadata
Release files for polimer 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| polimer-0.0.2-2-py3-none-any.whl | Python 3 | none | any | Details |
Release files / polimer-0.0.2-2-py3-none-any.whl
| Download URL | polimer-0.0.2-2-py3-none-any.whl |
|---|---|
| Size | 3.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d78809f3f0c35d022141bbcb5ab99dbfce2911caf4755cf78b2459a81fe9a3fc
|
|
BLAKE2b-256 checksum How to use checksums |
a95c81af94d8edfe913b2b97f374fa0cfeaaf9d5e8ba856fc21e34066bed6210
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.3
|