semvec/pypi-packages huggingface dataset:
telethon-client-wrapper 0.9.9
A simple Telegram (telethon) client wrapper
Requires Python: >=3.6

# README.md

## Introduction

This library simplifies the setup of Telethon clients for Telegram bots by handling configuration loading and client creation in a centralized way. It aims to streamline the process of creating Telegram bots, allowing developers to focus on bot logic rather than boilerplate code.

## Installation
```bash
pip install telethon-client-wrapper
```
## Configuration

Create a `config.json` file with the following fields:

```json
{
  "device_model": "YourDeviceModel",
  "system_version": "YourSystemVersion",
  "app_version": "YourAppVersion",
  "lang_code": "en",
  "system_lang_code": "en-US",
  "api_id": "YOUR_API_ID",
  "api_hash": "YOUR_API_HASH"
}
```

## Usage

Import and use the `create_client` function:

```python
from telethon_client_wrapper import create_client

client = create_client('config.json', 'my_session')

```

## Contribution Guidelines

Contributions are welcome

## Support

For support or inquiries, please contact [@Rerowros](https://t.me/Rerowros) or open an issue on GitHub.

## Roadmap

- [ ] Enhance error handling and logging.

## Links

- [Telethon Documentation](https://docs.telethon.dev/)
pyhtmx-lib 0.1.0
A simple wrapper/generator for HTMX pages
Requires Python: >=3.9

# PyHTMX


PyHTMX is a dead simple library to generate HTMX code in Python.

Inspired by this StackOverflow thread on [how to generate HTML with XML](https://stackoverflow.com/questions/70408116/generate-html-xml-in-python).


## Features

- Outputs indented code
- Outputs subtrees for the generated DOM
- Children elements and content can be provided as lists
- Building based on nested constructors or `with` statements


## Installing

```bash
  $ python3 -m pip install pyhtmx-lib
```

## Examples

First, an example based on nesting constructors:

```python
  from pyhtmx import *

  html = Html(
    [
      Head(
        [
          Title('My Website'),
          Script(src="https://unpkg.com/htmx.org@2.0.3"),
        ]
      ),
      Body(
        [
          Header(
            [
              Img(src='/path/to/logo.png', _id="logo"),
              Nav(
                Ul(
                  [
                    Li(
                      "First item.",
                      hx_post="/first-item-clicked",
                      hx_trigger="click",
                      hx_target="#container-div",
                      hx_swap="innerHTML",
                    ),
                    Li("Second item."),
                    Li("Third item.")
                  ]
                ),
              ),
            ]
          ),
          Div(
            'Content here',
            _id="container-div",
          ),
          Footer([Hr(), 'Copyright 2024']),
        ]
      ),
    ]
  )

html.dump()

```

The example results in the following output:

```html
<html>
  <head>
    <title>My Website</title>
    <script src="https://unpkg.com/htmx.org@2.0.3" />
  </head>
  <body>
    <header>
      <img src="/path/to/logo.png" id="logo" />
      <nav>
        <ul>
          <li hx-post="/first-item-clicked" hx-trigger="click" hx-target="#container-div" hx-swap="innerHTML">First item.</li>
          <li>Second item.</li>
          <li>Third item.</li>
        </ul>
      </nav>
    </header>
    <div id="container-div">Content here</div>
    <footer>
      <hr />
      <span>Copyright 2024</span>
    </footer>
  </body>
</html>

```

Now an example based on contexts defined with the `with` statement,

```python
with Div(_class="btn-primary") as div:
  with A(href="/link/to/another/site"):
    with P("This is the first paragraph.", style="color: blue"):
      pass
  with P("Yet another paragraph.", style="color: red"):
    pass

div.dump()

```

which results in

```html
<div class="btn-primary">
  <a href="/link/to/another/site">
    <p style="color: blue">This is the first paragraph.</p>
  </a>
  <p style="color: red">Yet another paragraph.</p>
</div>

```

Related projects
----------------

* https://github.com/cenkalti/pyhtml
* https://github.com/COMP1010UNSW/pyhtml-enhanced
ipython-pygments-lexers 1.1.1
Defines a variety of Pygments lexers for highlighting IPython code.
Requires Python: >=3.8

A [Pygments](https://pygments.org/) plugin for IPython code & console sessions

[IPython](https://ipython.org/) is an interactive Python shell. Among other features,
it adds some special convenience syntax, including `%magics`, `!shell commands`
and `help?`. This package contains lexers for these, to use with the Pygments syntax
highlighting package.

- The `ipython` lexer should be used where only input code is highlighted
- The `ipythonconsole` lexer works for an IPython session, including code,
  prompts, output and tracebacks.

These lexers were previously part of IPython itself (in `IPython.lib.lexers`),
but have now been moved to a separate package.