semvec/pypi-packages huggingface dataset:
jackfruit 0.12
Generic views for python-telegram-bot

# Jackfruit
## Introduction
This library provides a simple way for creating telegram bots with deep level menu.
## Components
Library give users components, like:

* Menu (_MenuView_) - give user ability select menu item and navigate on menus;
* Text Input (_TextDataInputView_) - give user ability enter text data;
* Image Input (_PhotoDataInputView_) - give user ability send image to bot;
* Document Input (_DocumentDataInputView_) - give user ability send files to bot;
* Audio Input (_AudioDataInputView_) - give user ability send audio files to bot;
* Video Input (_VideoDataInputView_) - give user ability send video files to bot;
* Voice Input (_VoiceDataInputView_) - give user ability send voice messages to bot;
* Sticker Input (_StickerDataInputView_) - give user ability send sticker to bot;

You can use class _GenericDataView_ for show user screen, that blocking next navigation and force user to use command syntax.

All components may be easy customized, for more details please see source code (it have commented).
## Usage
```python
from os import environ

from telegram.ext import Updater

from jackfruit import *


class MainMenu(MenuView):
    text = 'Hello from my bot!'
    menu_items = [[('Enter my name', 'EnterName'), ('Select my age', 'SelectAge')], ]


class EnterName(TextDataInputView):
    text = 'Enter my name:'

    def process_data(self, state, update, context, data):
        return 'MainMenu'


class SelectAge(MenuView):
    text = 'Select my age:'
    menu_items = [[('Below 18', 'MainMenu'), ('Above 18', 'MainMenu')]]


updater = Updater(environ['TOKEN'], use_context=True)
main_menu = MainMenu()
enter_name = EnterName()
select_age = SelectAge()
Jackfruit(updater.dispatcher, main_menu, [('start', 'MainMenu')]).register(enter_name, select_age)
updater.start_polling()
updater.idle()
```
snyp 0.1.9
Snyp is a command line utility that streamlines the process of creating text based documentation and programming tutorials in Markdown.

# Snyp
Snyp is a command line utility that streamlines the process of creating text based documentation and programming tutorials in Markdown.

Snyp extracts specified code snippets from a source file, formats them to enable syntax highlighting in Github Flavored Markdown and prefixes them with a comment exactly specifying where the snippet was extracted from, i.e.:


    ```python
    # snippet from example.py lines 1-2
    print('Hey there!')
    print('This is an example')
    ```
Which would be rendered like this:
```python
# snippet from example.py lines 1-2
print('Hey there!')
print('This is an example')
```
## Installation:
```pip install snyp```

## Usage:  ```snyp --help```

```bash
Usage: snyp.py [OPTIONS] [LINES]...

  Use this tool to extract code snippets from a source file (src) and append
  them to a markdown file (dest)  with proper Github Flavored Markdown
  formatting.

  You can use 0, 1 or 2 'lines' arguments:

  With 0 arguments, the entire source file will be extracted

  With 1 argument, the entire source file starting at lines[0] will be
  extracted

  With 2 arguments, lines lines[0] to lines[1] (inclusively) will be
  extracted from the source file

  Use snip --config to view and update the configuration

Options:
  -s, --src TEXT   The source file from which to extract the code snippet
  -d, --dest TEXT  The destination file to which to append the formatted
                   snippet. "-" for stdout
  -l, --lang TEXT  The language specific formatting to be applied to the code
                   snippet
  -c, --config     Edit the configuration, i.e. to change defaults, add
                   languages, etc.
  --help           Show this message and exit.
```
## Configuration ```snyp --config```
The above command will open Snyp's configuration file in your default editor. It's the easiest way to view and update the configuration.
### Section [default]

```ini
# snippet from snyp.ini lines 1-5 
[default]
default = python
src = snyp.py
dest = README.md


```
+ default: the default language profile to use if -l, --lang is not provided
+ src: relative path to the default source file if -s, --src is not provided
+ dest: relative path to the default destination file if -d, --dest is not provided

### Language sections: [python], etc.

```ini
# snippet from snyp.ini lines 16-19 
[html]
lang = html
commentStart = <!--
commentEnd = -->

```
+ lang: name of the language. Is used for the prefix that determines syntax highlighting
+ commentStart: How a comment starts in *lang*
+ commentEnd (optional): How a comment ends in *lang*
bitpit 1.2.0
event driven http download library with automatic resume and other features.
Keywords: download manager

:Date: 2019-10-13
:Version: 1.2.0
:Authors:
    * Mohammad Alghafli <thebsom@gmail.com>

Event driven http download library with automatic resume and other features.
The goal of this module is to ease the process of downloading files and resuming
interrupted downloads. The library is written in an event-driven style similar
to GTK. The module defines the class ``Downloader``. Instances of this class
download a file from an http server and call callback functions whenever an
event happens ralated to this download. Examples of events are download state
change (start, pause, complete, error) and download speed change. The following
is a typical usage example::
    
    import bitpit
    
    #will download this
    url = 'https://www.python.org/static/img/python-logo.png'
    d = bitpit.Downloader(url) #downloader instance
    
    #listen to download events and call a function whenever an event happens
    #print state when state changes
    d.listen('state-changed', lambda var: print('download state:', var.state))
    
    #print speed in human readable format whenever speed changes
    #speed is updated and callback is called every 1 second by default
    d.listen('speed-changed', lambda var: print('download speed:', *var.human_speed))
    
    #register another callback function to the speed change signal
    #print percentage downloaded whenever speed changes
    d.listen('speed-changed', lambda var: print(int(var.percentage), '%'))
    
    #print total file size in human readable format when the downloader knows the file size
    d.listen('size-changed', lambda var: print('total file size:', *var.human_size))
    
    #done registering callbacks. lets start our download
    #the following call will not block. it will start a new download thread
    d.start()
    
    #do some other work while download is taking place...
    
    #wait for download completion or error
    d.join()

This module can also be run as a main python script to download a file. You can
have a look at the main function for another usage example.

commandline syntax::

    python -m bitpit.py [-r rate_limit] [-m max_running] url [url ...]
    
args:
    * url: one or more urls to download.
    * -r rate_limit: total rate limit for all running downloads.
    * -m max_running: maximum number of running downloads at any single time.

--------
Tutorial
--------

Check out bitpit tutorial at http://bitpit.readthedocs.io/