https://github.com/aboev/polimer
Automated call stack synthesis framework (annotations based)
https://github.com/aboev/polimer
annotations fast-prototyping framework
Last synced: 3 months ago
JSON representation
Automated call stack synthesis framework (annotations based)
- Host: GitHub
- URL: https://github.com/aboev/polimer
- Owner: aboev
- License: mit
- Created: 2024-12-30T11:58:33.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-12-30T13:28:13.000Z (over 1 year ago)
- Last Synced: 2025-09-29T02:25:58.745Z (6 months ago)
- Topics: annotations, fast-prototyping, framework
- Language: Python
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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 of `l: list`
- Automatically invoke argument initializers based on payload id
- e.g. call `def get_price_list() -> 'price_list'`
- Simplify end-user code
## Quick-demo
1. Install **polimer**
```bash
pip install polimer
```
2. Annotate your methods with payload ids:
prices.py
```python
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)
```
3. Import your entrypoints via **polimer**
demo.py
```python
from prices import *
from polimer import prices
print(prices.calc_avg_price())
```