semvec/pypi-packages huggingface dataset:
b2bapi 2.1.0
Interact with the BytesToBits API through Python

# B2B API

API Wrapper in Python For the BytesToBits API

# Classes

## *b2bapi*.BytesToBits()

### **Attributes**:

None

### __Methods__

#### `BytesToBits().get_word()`

This method `GET`s a random word from the:
`https://api.bytestobits.dev/word` endpoint

It returns a `Word` object

#### `BytesToBits().get_meme()`

This method `GET`s a random meme from a random subreddit using the:
`https://api.bytestobits.dev/meme` endpoint

It returns a `Meme` object

#### `BytesToBits().get_speedtext()`

This method `GET`s a random selection of text from the:
`https://api.bytestobits.dev/speedtext2` endpoint

It returns a `Speedtext` object

#### `BytesToBits().get_madlib()`

This method `GET`s a random madlib to use by requesting the:
`https://api.bytestobits.dev/madlibs` endpoint

It returns a `Madlib` object

## *b2bapi*.Word(word)

### **Attributes**:

1. *Word()*.**word** (`str`) => The word that the word object represents

### __Methods__:

None

## *b2bapi*.Meme(title, url, link, subreddit)

### **Attributes**
1. *Meme()*.**title** (`str`) => The title of the meme
2. *Meme()*.**url** (`str`) => The URL of the meme image
3. *Meme()*.**link** (`str`) => The URL of the actual reddit post
4. *Meme()*.**subreddit** (`str`) => The name of the subreddit the meme is from

### __Methods__:
None

## *b2bapi*.Speedtext(text)

### **Attributes**
1. *Speedtext()*.**text** (`str`) => The text that the object represents

### __Methods__:
1. *Speedtext()*.**typewriter()** (`None`) => Prints out the text to `sys.stdout`, character by character to give a typing effect.

## *b2bapi*.Madlib(title, text, no_of_questions, questions, responses = [])

### **Attributes**
1. *Madlib()*.**title** (`str`) => The title of the madlib
2. *Madlib()*.**text** (`str`) => The text currebtly held by the madlib (if this madlib was returned by the `BytesToBits().get_madlib()` method, then this text will contain placeholders)
3. *Madlib()*.**no_of_questions** (`int`) => The number of placeholders in the text
4. *Madlib()*.**questions** (`list[str]`) => A list of strikgs which describe what type of word should go in the corresponding placeholder.

### __Methods__:
1. *Madlib()*.**get_responses()** (`list[str]`) => Prompts the user in `sys.stdout` to enter a word based on each question in `Madlib().questions`.
2. *Madlib()*.**substitute()** (`str`) => Will return the text with all the placeholders filled assuming `Madlib().responses` contains the correct number of strings. Also reassigns `Madlib().text` this new filled in version of the text.
translate-pandas 1.1.1
Translate pandas columns

This project currently supports Windows and Linux. Reach me at supanshah14@gmail.com if you would like mac support. In any case, google colab is supported!

#STEPS TO DOWNLOAD YOUR CLIENT SECRET JSON:

-Enable API Access for a Project in https://console.cloud.google.com/

-Go to “APIs & Services > OAuth Consent Screen.” Click the button for “Configure Consent Screen” and follow the directions to give your app a name; you don’t need to fill out anything else on that screen. Click Save.

-Go to “APIs & Services > Credentials”

-Click “+ Create credentials” at the top, then select “OAuth client ID”.

-Select “Desktop app”, name the credentials and click “Create”. Click “Ok” in the “OAuth client created” popup.

-Download the credentials by clicking the Download JSON button in “OAuth 2.0 Client IDs” section.

#HOW TO USE:

Suppose the column you want to translate is data['text'] which is in Japanese ('ja') and you want to translate that column to English ('en') language. To see language codes, visit https://cloud.google.com/translate/docs/languages

You can even translate lists or numpy arrays.

##1) To authorize client secret json:

-You won't need to authorize using client secrets json in google colab. It will directly ask you when you start translation the first time. For local runtimes, do the following: 

from translate_pandas import LoadClient 

LoadClient('path_to_your_client_secret_json') 

##2) To translate (you can use even "auto" as input language!):

from translate_pandas import Translate

data['Translation'] = Translate(data['Text'], "ja", "en")

##3) To translate a csv from command line:

Once in repo directory from command line: python translate.py -i /path/to/input/csv -c Column_Name_To_Translate --inLang ja --outLang en -o /path/to/output/csv (If not authorized using LoadClient yet, add the following argument) [Optional] --secret /path/to/your/client/secret.json

Done!


_______________________________

Demo colab at https://colab.research.google.com/drive/1Qf900ECUCVB-W545bTflQSkiB9hebSKb?usp=sharing
tendril-schema 0.2.8
Tendril Schema Management Infrastructure
Requires Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
Keywords: tendril

.. image:: https://img.shields.io/pypi/v/tendril-schema.svg?logo=pypi
    :target: https://pypi.org/project/tendril-schema

.. image:: https://img.shields.io/pypi/pyversions/tendril-schema.svg?logo=pypi
    :target: https://pypi.org/project/tendril-schema

.. image:: https://img.shields.io/travis/tendril-framework/tendril-schema.svg?logo=travis
    :target: https://travis-ci.org/tendril-framework/tendril-schema

.. image:: https://img.shields.io/coveralls/github/tendril-framework/tendril-schema.svg?logo=coveralls
    :target: https://coveralls.io/github/tendril-framework/tendril-schema

.. image:: https://img.shields.io/codacy/grade/37825781c4944c998fdc9c4d860c8c91?logo=codacy
    :target: https://www.codacy.com/app/chintal/tendril-schema

.. image:: https://img.shields.io/requires/github/tendril-framework/tendril-schema.svg
    :target: https://requires.io/github/tendril-framework/tendril-schema/requirements

.. image:: https://img.shields.io/pypi/l/tendril-schema.svg
    :target: https://www.gnu.org/licenses/agpl-3.0.en.html



.. inclusion-marker-do-not-remove

Introduction
------------

TODO Some brief introduction


Package Information
-------------------

The latest version of the documentation, including installation, usage, and
API/developer notes can be found at
`ReadTheDocs <https://tendril-schema.readthedocs.io/en/latest/index.html>`_.

The latest version of the sources can be found at
`GitHub <https://github.com/tendril-framework/tendril-schema>`_. Please use 
GitHub's features to report bugs, request features, or submit pull/merge requests.

The principle author for ``tendril-schema`` is Chintalagiri Shashank. The 
author can be contacted if necessary via the information on the
`author's github profile <https://github.com/chintal>`_ . See the AUTHORS file
for a full list of collaborators and/or contributing authors, if any.

``tendril-schema`` is distributed under the terms of the
`AGPLv3 license <https://www.gnu.org/licenses/agpl-3.0.en.html>`_ .
A copy of the text of the license is included along with the sources.
easy-validator 0.0.1
A package for easy json validation.
Requires Python: >=3.6

# Easy JSON Validator
    

## Description
A python package for deep json validation easy to use and well explained

# Install 
    pip install easy-validator

# Usage example 

## Success Case
```python

from easyvalidator import JsonValidator

source = {"name": "My Name", "birth": "2000-01-01", "salary": 1000} # your json

template = {"name": ["NotNull"]} # what you want to test 

validator = JsonValidator(template=template, source=source)       

result = validator.validate()       

print(f"result: {result}")

# result: {'name': {'value': "My Name", 'rules': ['NotNull'], 'validations': {'NotNull': {'status': 'OK'}}}}

```

## Fail Case
```python

from easyvalidator import JsonValidator

source = {"name": null, "birth": "2000-01-01", "salary": 1000} # your json

template = {"name": ["NotNull"]} # what you want to test

validator = JsonValidator(template=template, source=source)       

result = validator.validate()       

print(f"result: {result}")

# result: {'name': {'value': "My Name", 'rules': ['NotNull'], 'validations': {'NotNull': {'status': 'FAIL', 'msg': 'Field can not be null'}}}}

```

## More Complex Case with deep field validation
```python

from easyvalidator import JsonValidator

source = {"name": "My Name", "birth": "2000-01-01", "salary": 1000, "address": {"details": "number": 13}} # your json

template = {"address": {"details": "number": ["GreaterThan(value=12)", "IsBetween(start=10, end=20)"]}} # what you want to test 

validator = JsonValidator(template=template, source=source)       

result = validator.validate()       

print(f"result: {result}")

# result: {"address": {"details": "number": {'value': 13, 'rules': ['GreaterThan(value=12)', 'IsBetween(start=10, end=20)'], 'validations': {'GreaterThan(value=12)': {'status': 'OK'}, IsBetween(start=10, end=20)': {'status': 'OK'}}}}

```


# Available Rules 
NotNull  
NotEmpty  
IsEmpty  
NotEquals(value=VALUE)  
IsBetween(start=NUMERICAL VALUE, end=NUMERICAL VALUE)  
IsNotBetween(start=NUMERICAL VALUE, end=NUMERICAL VALUE)  
DateIsAfter(date=YYYY-mm-dd)  
DateIsBefore(date=YYYY-mm-dd)  
DateIsExactly(date=YYYY-mm-dd)  
GreaterThan(value=NUMERICAL VALUE)  
LessThan(value=NUMERICAL VALUE)  
LessThanOrEqual(value=NUMERICAL VALUE)  
GreaterThanOrEqual(value=NUMERICAL VALUE)  
TextEquals(value=VALUE)  
TextContains(value=VALUE)  
TextNotContains(value=VALUE)  
TextStartsWith(value=VALUE)  
TextEndsWith(value=VALUE)  


## Source Code

[easyvalidator](https://github.com/brworkit/python-package-easy-validator.git)

## Author

[**2020 brworkit**](https://github.com/brworkit).