semvec/pypi-packages huggingface dataset:
py-patterns-util 0.1.1
A util library for common patterns in python.
License: MIT
Requires Python: >=3.9,<4.0
Keywords: python,design-patterns,adapters

# py-patterns

A util library for common patterns in python.

## Supported patterns

1. Adapters


## Install
```sh
pip install py-patterns-util
```

## Example

```py
from py_patterns.adapters import Field, Adapter


class PersonAdapter(Adapter):
    last_name = Field(source="person.last_name", dtype=str)
    first_name = Field(source="person.first_name", dtype=str)
    age = Field(source="person.age", dtype=int)


source_data = {"person": {"last_name": "Smith", "first_name": "John", "age": 30}}

# {"last_name": "Smith", "first_name": "John", "age": 30}
converted_data = PersonAdapter(source_data=source_data).convert()
```
facebook-events-scraper 0.0.2
A simple tool to scrape Facebook events using Selenium
License: MIT

# facebook-events-development
A simple tool to scrape Facebook events using Selenium
# Requirements
- Chrome is installed on your computer. If your computer doesn't have Chrome, you can download it from [here](https://www.google.com/chrome/). \
  If you don't have access to a browser, you can download using this guide: https://linuxize.com/post/how-to-install-google-chrome-web-browser-on-ubuntu-20-04/.

# Usage
```python
from facebook_events import find_all_events
print(find_all_events('https://www.facebook.com/csesoc/events/'))
# ['https://www.facebook.com/events/1338543436555126/', ...]
```

```python
from facebook_events import get_event_details
import json
print(json.dumps(get_event_details('https://facebook.com/events/837282680573570/'), indent=2))
{
  "id": "837282680573570",
  "url": "https://facebook.com/events/837282680573570/",
  "title": "SecSoc x CSESoc BBQ",
  "time_start": "2022-07-13T12:00:00",
  "time_finish": "2022-07-13T14:00:00",
  "description": "...",
  "location": "...",
  "hosts": [
    {
      "id": "csesoc",
      "name": "CSESoc UNSW",
      "url": "https://www.facebook.com/csesoc/"
    }
  ],
  "image_url": "...",
  "category": None
}
```

# Notes
- This is a very early version of the tool. It is not yet complete.
py-smsify 0.2.1
Python library for creating GSM-7 compatible SMS messages
License: MIT
Requires Python: >=3.9,<4.0
Keywords: SMS,GSM-7,Encoding,Unicode,3GPP,23.038,03.38

![](https://i.imgur.com/xuHAE49.png)
# Python library for creating GSM-7 compatible SMS messages

### Installation
`pip install py-smsify`

### Standalone Functions
```python
from py_smsify import SmsMessage

# Encode python string into a GSM-7 python encoded string
SmsMessage.encode(string: str) -> str

# Encode a unicode string to a bytearray of SMS characters
SmsMessage.message_encode(string: str) -> bytearray
```

### Usage
```python
from py_smsify import SmsMessage

#Encode to a string of valid characters
message = SmsMessage("Cool Message!").encoded_text
# result: Cool Message!

#Encode to a python bytestring
message = SmsMessage("Cool Message!").encoded_bytes
# result: b"Cool Message!"

#Encode with non latin languages/characters
message = SmsMessage("酷短信！").encoded_text
# result: KuDuanXin!

#Encode with emojis
message = SmsMessage("Cool😎 Message✉️").encoded_text
# result: "Cool:sunglasses: Message:envelope:"
```

### Message Stats
```python
from py_smsify import SmsMessage

#Get message length in bytes
message = SmsMessage("Cool Message!").length
# result: 13 bytes
message = SmsMessage("He\\o W{}rld!").length #{} are characters from the extended table and therefore require 2 bytes of space
# result: 15 bytes

#Get amount of segments the message will be split to
message = SmsMessage("Cool Message!").segments
# result: 1 message

#You can also have it calculate segment count with twilio message headers in mind
message = SmsMessage("Cool Message!",twilio=True).segments
# result: 1 message

```