semvec/pypi-packages huggingface dataset:
postr 0.1.0
Small python nostr client
Requires Python: >=3.10,<4.0

# Postr
Small python nostr client library for Python 3.10+

## Installation 
```
pip install postr
```

## Example

```python
import asyncio
import postr

async def controller():
    user = postr.User()
    hub = postr.RelayHub()
    damus = await hub.connect("wss://relay.damus.io")
    wellorder = await hub.connect("wss://nostr-verified.wellorder.net")


    hub.publish(
        postr.RequestMessage(
            subscription_id="ABC",
            filters=postr.Filter(kinds=postr.SetMetadata),
        )
    )
    # 
    hub.publish(
        postr.EventMessage(event=user.sign(postr.TextNote(content="Hello there!")))
    )

    # parse messages as they are received
    while True:
        match message := await hub.messages.get():
            case postr.SubscriptionResponse(event=postr.TextNote()):
                event = message.event
                log.info(f"TextNote {event.content}")
            case postr.SubscriptionResponse(event=postr.RecommendServer()):
                event = message.event
                known = set(map(lambda x: x.relay, hub.connections))
                if event.url not in known:
                    log.info(f"Connecting to '{event.url}'")
                    socket = await hub.connect(event.url)
            case postr.SubscriptionResponse(event=postr.SetMetadata()):
                event = message.event
                log.info(f"Set Metadata: {event.content}")
            case postr.SubscriptionResponse():
                event = message.event
                log.info(f"unknown kind {event.kind}")
            case postr.EndOfStoredEventsResponse():
                log.info("Closing subscription at end of stored events")
                hub.publish(
                    postr.CloseMessage(subscription_id=message.subscription_id),
                    connection=message.relay,
                )
            case _:
                log.info("Received something else")


if __name__ == "__main__":
    logging.basicConfig(level=logging.INFO)
```
streamlit-vis-timeline 0.3.0
Streamlit component for rendering vis.js timeline
Requires Python: >=3.7

# streamlit-timeline-demo

[![image](https://img.shields.io/pypi/v/streamlit-vis-timeline.svg)](https://pypi.python.org/pypi/streamlit-vis-timeline)
[![image](https://pepy.tech/badge/streamlit-vis-timeline)](https://pepy.tech/project/streamlit-vis-timeline)
[![Open in Streamlit](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://timeline.streamlitapp.com/)

Streamlit component for rendering [vis.js timeline](https://github.com/visjs/vis-timeline) with bidirectional communication.

Check out the GitHub repositories [streamlit-timeline](https://github.com/giswqs/streamlit-timeline) and
[streamlit-timeline-demo](https://github.com/giswqs/streamlit-timeline-demo). For JavaScript examples,
check out the vis.js timeline [examples](https://visjs.github.io/vis-timeline/examples/timeline/) and
[documentation](https://visjs.github.io/vis-timeline/docs/timeline/).

## Installation

```bash
pip install streamlit-vis-timeline
```

## Usage

```python
import streamlit as st
from streamlit_timeline import st_timeline

st.set_page_config(layout="wide")

items = [
    {"id": 1, "content": "2022-10-20", "start": "2022-10-20"},
    {"id": 2, "content": "2022-10-09", "start": "2022-10-09"},
    {"id": 3, "content": "2022-10-18", "start": "2022-10-18"},
    {"id": 4, "content": "2022-10-16", "start": "2022-10-16"},
    {"id": 5, "content": "2022-10-25", "start": "2022-10-25"},
    {"id": 6, "content": "2022-10-27", "start": "2022-10-27"},
]

timeline = st_timeline(items, groups=[], options={}, height="300px")
st.subheader("Selected item")
st.write(timeline)
```

## Demo

![](https://i.imgur.com/i6N7aj4.gif)
pyareas 0.1.0
Python package for areas of 2D shapes
Requires Python: >=3.7

pyareas
=======
A simple Python library for finding the areas of 2D shapes
----------------------------------------------------------
Shapes Included:
----------------
- Square
- Triangle
- Rectangle
- Circle
- Parellelogram
- Ellipse
- Rhombus
- Trapezoid
- Polygon(regular)
- Kite
- Star

Install command:
----------------
```
pip install pyareas
```

Example:
--------
```
from pyareas import *

print(Square(10))
```
Gives the output:
```
100
```
Newest Feature:
---------------
- Star!
- Takes the arguments of the internal shape's side, the internal shape's apothem, the number of points on the star, and the height of the triangles(the points)
- The old functions of pentagram, hexagram and heptagram are still in the source code, but i thought i would add a function for all stars.

To do:
------
- Add more shapes
- Create a new library for volume of 3D shapes
	- pyvolumes?
	- pyareas3d?