semvec/pypi-packages huggingface dataset:
log-proxy 2.0
Proxy the log from one system to another
License: MIT
Requires Python: >=3.7
Keywords: logging socket proxy

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/log-proxy)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

# log-proxy

This package implements a logging server which can be secured with TLS. The server can forward the
logs to another server allowing the definition of gateways. The transmission happens using JSON
instead of pickle used by pythons SocketHandler to prevent code execution.

The main purpose of this project is to aggregate logs via the network inside of a database like
PostgreSQL or MongoDB. The client is able to collect the logs from different sources.

This tool is not designed to later process, view, or manage the logs inside of the database.

## Features

- Log aggregation and proxy servers
- Forward the logs in a server to another server or database (MongoDB, PostgreSQL)
- Logging handlers to send logs to the logging server from existing apps
- Client tool for testing
- Secure the transmission with TLS and token authentication

## Usage examples

#### Start a logging server and forward the logs to a MongoDB database

`$ python3 -m log_proxy server mongodb --db logs --db-table log <...>`

#### Start a logging server and forward the logs to the next server

`$ python3 -m log_proxy server socket --forward <host>`

#### Start client for testing

`$ python3 -m log_proxy client --forward <host> --log-stdin`
cloudgram-telethon 1.24.2.post1
Full-featured Telegram client library for Python 3
License: MIT
Requires Python: >=3.7
Keywords: telegram api chat client library messaging mtproto

Telethon
========
.. epigraph::

  ⭐️ Thanks **everyone** who has starred the project, it means a lot!

|logo| **Telethon** is an asyncio_ **Python 3**
MTProto_ library to interact with Telegram_'s API
as a user or through a bot account (bot API alternative).

.. important::

    If you have code using Telethon before its 1.0 version, you must
    read `Compatibility and Convenience`_ to learn how to migrate.

What is this?
-------------

Telegram is a popular messaging application. This library is meant
to make it easy for you to write Python programs that can interact
with Telegram. Think of it as a wrapper that has already done the
heavy job for you, so you can focus on developing an application.


Installing
----------

.. code-block:: sh

  pip3 install telethon


Creating a client
-----------------

.. code-block:: python

    import asyncio
    from telethon import TelegramClient, events

    # These example values won't work. You must get your own api_id and
    # api_hash from https://my.telegram.org, under API Development.
    api_id = 12345
    api_hash = '0123456789abcdef0123456789abcdef'

    async def main():
      client = TelegramClient('session_name', api_id, api_hash)
      await client.start()

    asyncio.run(main())


Doing stuff
-----------

.. code-block:: python

    print((await client.get_me()).stringify())

    await client.send_message('username', 'Hello! Talking to you from Telethon')
    await client.send_file('username', '/home/myself/Pictures/holidays.jpg')

    await client.download_profile_photo('me')
    messages = await client.get_messages('username')
    await messages[0].download_media()

    @client.on(events.NewMessage(pattern='(?i)hi|hello'))
    async def handler(event):
        await event.respond('Hey!')


Next steps
----------

Do you like how Telethon looks? Check out `Read The Docs`_ for a more
in-depth explanation, with examples, troubleshooting issues, and more
useful information.

.. _asyncio: https://docs.python.org/3/library/asyncio.html
.. _MTProto: https://core.telegram.org/mtproto
.. _Telegram: https://telegram.org
.. _Compatibility and Convenience: https://docs.telethon.dev/en/stable/misc/compatibility-and-convenience.html
.. _Read The Docs: https://docs.telethon.dev

.. |logo| image:: logo.svg
    :width: 24pt
    :height: 24pt
pyqt-line-number-widget 0.0.1
QWidget which shows line numbers of QTextBrowser or QTextEdit
License: MIT


# pyqt-line-number-widget
Show line numbers next to QTextBrowser or QTextEdit

## Requirements
* PyQt5 >= 5.8

## Setup
`python -m pip install pyqt-line-number-widget`

## Example
Code Sample
```python
from PyQt5.QtWidgets import QApplication, QHBoxLayout, QTextEdit, QWidget
from pyqt_line_number_widget import LineNumberWidget


class MainWindow(QWidget):
    def __init__(self):
        super().__init__()
        self.__initUi()

    def __initUi(self):
        self.__te = QTextEdit()
        self.__te.textChanged.connect(self.__line_widget_line_count_changed)
        self.__lineWidget = LineNumberWidget(self.__te)

        lay = QHBoxLayout()
        lay.addWidget(self.__lineWidget)
        lay.addWidget(self.__te)

        self.setLayout(lay)

    def __line_widget_line_count_changed(self):
        if self.__lineWidget:
            n = int(self.__te.document().lineCount())
            self.__lineWidget.changeLineCount(n)


if __name__ == "__main__":
    import sys

    app = QApplication(sys.argv)
    mainWindow = MainWindow()
    mainWindow.show()
    app.exec()
```

Result

https://user-images.githubusercontent.com/55078043/174435483-d6e8b57c-5b26-48fd-a5a7-454841e11d69.mp4