semvec/pypi-packages huggingface dataset:
busrt 0.1.2
Python client for BUS/RT (sync)
License: MIT

# Python sync client for BUS/RT

The module contains Python sync client for [BUS/RT](https://github.com/alttch/busrt)

## Installation

```shell
pip3 install busrt
```

## Usage examples

### Listener

```python
import busrt
import time

# frame handler
def on_frame(frame):
    print('Frame:', hex(frame.type), frame.sender, frame.topic, frame.payload)

name = 'test.client.python.sync'
# create new BUS/RT client and connect
bus = busrt.client.Client('/tmp/busrt.sock', name)
bus.on_frame = on_frame
bus.connect()
# subscribe to all topics
bus.subscribe('#').wait_completed()
# wait for frames
print(f'listening for messages to {name}...')
while bus.is_connected():
    time.sleep(0.1)
```

### Sender

```python
import busrt

name = 'test.client.python.sender'
bus = busrt.client.Client('/tmp/busrt.sock', name)
bus.connect()
# send a regular message
print(
    hex(
        bus.send('test.client.python.sync',
                 busrt.client.Frame('hello')).wait_completed()))
# send a broadcast message
print(
    hex(
        bus.send(
            'test.*',
            busrt.client.Frame('hello everyone',
                               tp=busrt.client.OP_BROADCAST)).wait_completed()))
# publish to a topic with zero QoS (no confirmation required)
bus.send('test/topic',
         busrt.client.Frame('something', tp=busrt.client.OP_PUBLISH, qos=0))
```

## RPC layer

### Handler

```python
import busrt
import time
import msgpack

# frame handler (topics/broadcasts)
def on_frame(frame):
    print('Frame:', hex(frame.type), frame.sender, frame.topic, frame.payload)


# RPC notification handler
def on_notification(event):
    print('Notification:', event.frame.sender, event.get_payload())


# RPC call handler
def on_call(event):
    # consider payload is encoded in msgpack
    print('Call:', event.frame.sender, event.method,
          msgpack.loads(event.get_payload(), raw=False))
    # msgpack reply
    return msgpack.dumps({'ok': True})

name = 'test.client.python.sync.rpc'
# create new BUS/RT client and connect
bus = busrt.client.Client('/tmp/busrt.sock', name)
bus.connect()
# subscribe to all topics
bus.subscribe('#').wait_completed()
# init rpc
rpc = busrt.rpc.Rpc(bus)
rpc.on_frame = on_frame
rpc.on_notification = on_notification
rpc.on_call = on_call
# wait for frames
print(f'listening for messages/calls to {name}...')
while rpc.is_connected():
    time.sleep(0.1)
```

### Caller

```python
import busrt
import msgpack

name = 'test.client.python.sync.rpc.caller'
# create new BUS/RT client and connect
bus = busrt.client.Client('/tmp/busrt.sock', name)
bus.connect()
# init rpc
rpc = busrt.rpc.Rpc(bus)
params = {'hello': 123}
# call a method, no reply required
rpc.call0('test.client.python.sync.rpc',
          busrt.rpc.Request('test', msgpack.dumps(params))).wait_completed()
# call a method and wait for the reply
result = rpc.call('test.client.python.sync.rpc',
                  busrt.rpc.Request('test',
                                    msgpack.dumps(params))).wait_completed()
print(msgpack.loads(result.get_payload(), raw=False))
```
parser-cian 0.1.6
Parser for easy data retrieval from cian.ru
License: MIT
Keywords: python parser requests cian realestate beautifulsoup dataset

# Cian Parser #

## What is this? ##
This is a parser with which you can easily get data from a website cian.ru.

## Quick Guide ##
This module is based on Selenium-Stealth, using BeautifulSoup as well as Asyncio

Data you can get:
1) Name of apartment
2) The city district in which the housing estate is located
3) Price of the apartment             
4) Time to the subway
5) How to get to the subway          
6) Nearest subway             
7) Price per square meter             
8) Total square footage             
9) Living Space             
10) Floor             
11) Number of stories in the house             
12) Year of delivery of the house                       
13) Surrendered or not             
14) Finishing             
15) Parking             
16) Ceiling Heights            
17) Builder Rating 

----------


### Using ###


Using the library is as simple and convenient as possible:

Let's import it first:
First, import everything from the library (use the `from `...` import *` construct).

Examples of all operations:

Сreate an instance of a class `Cian_Parser` (PATH - file save path, URL - site url, BOOST (True or False) - you can also receive a seller rating, but the speed is reduced several times, COUNT_PAGE - how many pages of apartments do you want to receive):

    parser = Cian_Parser(PATH, URL, BOOST, COUNT_PAGE)

Receive all data of all apartments in CSV format using the `start_parsing()` function:

    parser.start_parsing()

If you want to create your own parser logic, then use the description of the other modules:

Сreate an instance of a class `Pagination` (parser - parser instance from the Flats_Url class, next_button_selector - XPATH pagination buttons)

    pagination = Pagination(parser, next_button_selector)

Checking for next page using the `HasNextPage()` function:

    await pagination.HasNextPage()

Go to next page using the `GoToTheNextPage()` function:

    await pagination.GoToTheNextPage()



## Developer ##
My site: [link](https://ezsmail.github.io/Profile/)