Saravanan666/pypi-org huggingface dataset:
Package: typebuild
TypeBuildTypeBuild is a powerful Python package that empowers domain experts to develop their own frontend with just natural language input. This tool is designed to help users perform data analysis and visualization with tabular data (csv, xlsx, .db, .sqlite, .parquet). It also allows users to upload and interact with text documents for summarization, classification, and Q&A.TypeBuild leverages the power of OpenAI's GPT models, but also provides the flexibility for users to upload their own llm function. Users can create projects and new views using the chat feature in the tool.InstallationYou can install TypeBuild using pip:pipinstalltypebuildAfter installation, you can run the command 'typebuild' from your command line to launch the Streamlit app.FeaturesData Analysis and Visualization: Analyze and visualize tabular data from various formats including csv, xlsx, .db, .sqlite, .parquet.Document Interaction: Upload and interact with text documents for tasks such as summarization, classification, and Q&A.Customizable AI Models: Use OpenAI's GPT models or upload your own llm function.Project Creation: Create and manage projects using the chat feature in the tool.UsageAfter installing the package, you can launch the Streamlit app by running:typebuildThis will open a new browser window where you can start creating projects, uploading data, and interacting with your documents.ContributingWe welcome contributions to TypeBuild. Please see ourContributing Guidefor more details.LicenseShield:This work is licensed under aCreative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.SupportIf you encounter any issues or have any questions about TypeBuild, please open an issue on ourGitHub page.AcknowledgementsWe would like to thank the OpenAI team for their GPT models which have been instrumental in the development of TypeBuild.
Package: typecase
A library providingAlgebraic Data Typesfor Python.This library is in a very early development stage (pre-alpha) andthus not
recommended  - yet - for public use.DevelopmentThe easiest way to run the tests is with tox, for this install:pip install tox tox-pyenvYou can omit “tox-pyenv” if you are not using pyenv for installing your Python
distribution.Tests are executed via:tox
Package: typecasts
typecastsConvert from one Python type to another in a centralized way.Featuresfromtypecastsimportcastsstr_to_bytes_coder=casts[str,bytes]str_to_bytes_coder('boo')# b'boo'InstallationpipinstalltypecastsCreditsThis project was generated withwemake-python-package. Current template version is:cf0afc42e6f5f3886be1d93b6c56b0f422b3a15a. See what isupdatedsince then.
Package: typechatpy
Typechat.pyA python implement to makes it easy to build natural language interfaces using types.Installpip install typechatpyUsageseesimple.Exampleseesimplefor more detail (theresponsesample as bellow).{"data":[{"venue":"Seattle Art Museum","description":"Explore the extensive collection of art from around the world at the Seattle Art Museum. From contemporary art to ancient artifacts, there is something for everyone to enjoy."},{"venue":"Pike Place Market","description":"Indulge in a unique shopping experience at Pike Place Market. Browse through local produce, crafts, and specialty shops, and enjoy a variety of delicious food options."},{"venue":"Chihuly Garden and Glass","description":"Marvel at the stunning glass artworks created by Dale Chihuly at the Chihuly Garden and Glass exhibit. The vibrant colors and intricate designs are sure to captivate your senses."}]}TODOtranslatorvalidatorllm interactRefpydantictypechat
Package: typecheck
A runtime type-checking module for Python supporting both parameter-type checking and return-type checking for functions, methods and generators.The main workhorses of this module, the functionsacceptsandreturns, are used as function/method decorators. Ayieldsdecorator provides a mechanism to typecheck the values yielded by generators.Four utility classes, IsAllOf(), IsOneOf(), IsNoneOf() and IsOnlyOneOf() are provided to assist in building more complex signatures by creating boolean expressions based on classes and/or types.A number of other utility classes exist to aid in type signature creation; for a full list, see the README.txt file or the project’s website.The module also includes support for type variables, a concept borrowed from languages such as Haskell.
Package: type-check
Type CheckType check decorator for pythonInstallation:pip3 install type-checkUsage:Importtype_checkdecorator:from type_check import type_checkUsage in function:@type_check
def my_func(arg: type = default) -> return_type:
    return return_type()At class function, specify type ofselfwith base type, for example:@type_check
def __init__(self: object, arg: type = default):
    pass
Package: typecheck3
typecheck3===An easy-to-use Python 3 runtime typechecker.Usage---The typical usage for this decorator would be something like this:@typecheckdef foo(i: int) -> bool:return a > 0@typecheckdef to_int(*, s: by_regex("^[0-9]+$")) -> int:return int(s)@typecheckdef set_debug_level(self, level: optional(one_of(1, 2, 3)) = 2):self._level = levelThis recipe is extensible with callable predicates, such asis_even = lambda x: x % 2 == 0@typecheckdef multiply_by_2(i: int) -> is_even:return i * 2Credits---The code was written by Dmitri Dvoinikov and maintained by Esteban Ordano(@eordano on twitter).Original link:http://code.activestate.com/recipes/572161/
Package: typecheck-decorator-stable
A decorator for functions,@tc.typecheck, to be used together with
Python3 annotations on function parameters and function results.
The decorator will perform dynamic argument type checking for every call to the function.@tc.typecheck
def foo1(a:int, b=None, c:str="mydefault") -> bool :
    print(a, b, c)
    return b is not None and a != bThe parts:int,:str, and->boolare annotations.
This is a syntactic feature introduced in Python 3 where:(for parameters)
and->(for results) are delimiters and the rest can be
an arbitrary expression.
It is important to understand that, as such,annotations do not have any semantics whatsoever.
There must be explicit Python code somewhere
that looks at them and does something in order to give them a meaning.The@tc.typecheckdecorator gives the above annotations the following meaning:foo1’s argumentamust have typeint,bhas no annotation and can have any type whatsoever, it will not be checked,cmust have type string,
and the function’s result must be eitherTrue(not17or"yes"or[3,7,44]or some such) orFalse(not0orNoneor[]or some such).If any argument has the wrong type, aTypeCheckErrorexception will be raised.
Class types, collection types, fixed-length collections and
type predicates can be annotated as well.
Here is a more complex example:import typecheck as tc

@tc.typecheck
def foo2(record:(int,int,bool), rgb:tc.re("^[rgb]$")) -> tc.any(int,float) :
    a = record[0]; b = record[1]
    return a/b if (a/b == float(a)/b) else float(a)/b

foo2((4,10,True), "r")   # OK
foo2([4,10,True], "g")   # OK: list is acceptable in place of tuple
foo2((4,10,1), "rg")     # Wrong: 1 is not a bool, string is too long
foo2(None,     "R")      # Wrong: None is no tuple, string has illegal characterThese annotations mean thatrecordis a 3-tuple of two ints and
an actual bool andrgbis a one-character string that is
either “r” or “g” or “b” by virtue of a regular expression test.
The result will be a number that can be either int or float.Other kinds of annotations:tc.optional(int)will allow int and None,tc.enum(1, 2.0, "three")allows to define ad-hoc enumeration types,tc.map_of(str, tc.list_of(Person))describes dictionaries where all
keys are strings and all values are homogeneous lists of Persons,and so on.Find the documentation athttps://github.com/prechelt/typecheck-decorator
Package: typechecker
This module provides dynamic type check mechanism.Normal Type Check:>>> from typechecker import typeinfo, list_, tuple_, has_attrs
>>> @typeinfo(int, x=int, y=int)
... def add(x, y):
...     return x + y
>>> add(10, 20)
30
>>> add('aa', 'bb')
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "typechecker/typeinfo.py", line 113, in call
    _check_arg(f, assigned, types)
  File "typechecker/typeinfo.py", line 84, in _check_arg
    f.__name__))
TypeError: In function add, argument "y" required "int". "str" found.Tuple Type Check:>>> @typeinfo(int, val=tuple_(int, str))
... def test(val):
...     return len(val)
...
>>> test((19, 'aaa'))
2
>>> test('aaa')
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "typechecker/typeinfo.py", line 113, in call
    _check_arg(f, assigned, types)
  File "typechecker/typeinfo.py", line 84, in _check_arg
    f.__name__))
TypeError: In function test, argument "val" required "tuple[int, str]". "str" found.List Type Check:>>> @typeinfo(int, val=list_(int))
... def test(val):
...     return 10
...
>>> test([1,2,3])
10
>>> test([1,2,'aaa'])
Traceback (most recent call last):
  File "typechecker/typeinfo.py", line 113, in call
    _check_arg(f, assigned, types)
  File "typechecker/typeinfo.py", line 84, in _check_arg
    f.__name__))
TypeError: In function test, argument "val" required "list[int]". "list" found.Complex Type Check:>>> @typeinfo(int, val=tuple_(list_(int)))
... def test(val):
...     return 10
...
>>> test(([1],))
10
>>> test((['aa'],))
Traceback (most recent call last):
  File "/usr/local/python2.7/lib/python2.7/doctest.py", line 1254, in __run
    compileflags, 1) in test.globs
  File "<doctest typechecker[12]>", line 1, in <module>
    test((['aa'],))
  File "typechecker/typeinfo.py", line 113, in call
    _check_arg(f, assigned, types)
  File "typechecker/typeinfo.py", line 84, in _check_arg
    f.__name__))
TypeError: In function test, argument "val" required "tuple[list[int]]". "tuple" found.Structural subtyping:>>> @typeinfo(int, f=Callable)
... def test(f):
...     return 10
...
>>> test(map)
10
>>> test(1)
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "typechecker/typeinfo.py", line 113, in call
    _check_arg(f, assigned, types)
  File "typechecker/typeinfo.py", line 84, in _check_arg
    f.__name__))
TypeError: In function test, argument "f" required "hasattr[__call__]". "int" found.And check:>>> @typeinfo(int, f=and_(Callable, ContextManager))
... def test(f):
...     return 10
...
>>> test(file)
10
>>> test(map)
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "typechecker/typeinfo.py", line 113, in call
    _check_arg(f, assigned, types)
  File "typechecker/typeinfo.py", line 84, in _check_arg
    f.__name__))
TypeError: In function test, argument "f" required "And[hasattr[__call__], hasattr[__enter__, __exit__]]". "builtin_function_or_method" found.
Package: type-checker
# Type CheckerType check Python types with support for nested lists and dictionaries.[![coverage report](https://gitlab.com/robjampar/type-checker/badges/master/coverage.svg)](https://gitlab.com/robjampar/type-checker/commits/master)[![pipeline status](https://gitlab.com/robjampar/type-checker/badges/master/pipeline.svg)](https://gitlab.com/robjampar/type-checker/commits/master)## InstallationType Checker is a Python package, and is compatible with `Python 3` only (for now). It can be installed through `pip`.##### Pip```pip install type-checker```## Run the Unit TestsTo run the tests.```pip install pipenvpipenv install --devpipenv run python -m pytest tests --cov=type_checker```## DocsThe documentation is public, and is generated using Sphinx.[Type Checker Documentation](https://robjampar.gitlab.io/type-checker)##### Build documentationTo build a local static HTML version of the documentation.```pip install pipenvpipenv install sphinxpipenv run sphinx-build docs ./public -b html```## Type Checking Example``` pythonfrom typing import Unionfrom type_checker import type_check# the type defintion to check a value againsttype_def = {"hello": {"world": int},"a_key": str,"a_list": [float],int: bool,float: Union[bool, int]}# a valid test valuetest_value = {"hello": {"world": 1},"a_key": "this_is_a_string","a_list": [3.2,4.75.9],5: True,5.2: False,5.7: 10}# use validate from the type_checker package to validate the valueis_valid = type_check(test_value, type_def)print(f"is valid: {is_valid}")`````` text$ python example.py>>> is valid: True```
Package: type-checker-decorators
How to Importfrom type_checker.decorators import enforce_strict_typesExamples utilisationfrom dataclasses import dataclass

from type_checker.decorators import enforce_strict_types


@enforce_strict_types
@dataclass
class Person:
    name: str
    age: int


def test_greet_person_with_wrong_types():
    try:
        Person(123, "twenty")
    except TypeError as e:
        assert (
            str(e)
            == "Problem on function Person, Expected type '<class 'str'>' for argument 'name' but received type '<class 'int'>' instead"
        )
    try:
        Person("Alice", "twenty")
    except TypeError as e:
        assert (
            str(e)
            == "Problem on function Person, Expected type '<class 'int'>' for argument 'age' but received type '<class 'str'>' instead"
        )from type_checker.decorators import enforce_strict_types


@enforce_strict_types
def greet(name: str, age: int):
    print(f"Hello, {name}! You are {age} years old.")


def test_greet_with_wrong_types():
    try:
        greet(123, "twenty")
    except TypeError as e:
        print(str(e))
        assert (
            str(e)
            == "Problem on function greet, Expected type '<class 'str'>' for argument 'name' but received type '<class 'int'>' instead"
        )
    try:
        greet("Alice", "twenty")
    except TypeError as e:
        assert (
            str(e)
            == "Problem on function greet, Expected type '<class 'int'>' for argument 'age' but received type '<class 'str'>' instead"
        )
Package: typecmd
This is a command tootset used in my work.System requirementsinstall poetryHow to installpipxinstalltypecmdHow to useAfter installed, you can use command directory in this toolset.For example:yaml2json --helpHow to buildclone sourcegitclonehttps://github.com/telesoho/typecmd.gitcdtypecmd
poetryinstall
poetrybuildActive shellpoetryshelluse pipx to install the cli commands.pipxinstalldist/typecmd-<version>.tar.gzNow you can usetypecmd.typecmd--help
Package: typecode
license: Apache-2.0copyright: copyright (c) nexB. Inc. and othershomepage_url:https://github.com/nexB/typecodekeywords: filetype, mimetype, libmagic, scancode-toolkit, typecodeTypeCode provides comprehensive filetype and mimetype detection using multiple
detectors including libmagic (included as a dependency for Linux, Windows and
macOS) and Pygments. It started as library in scancode-toolkit.
Visithttps://aboutcode.organdhttps://github.com/nexB/for support and download.We run CI tests on:Travishttps://travis-ci.org/github/nexB/typecodeAzure pipelineshttps://dev.azure.com/nexB/typecode/_buildTo install this package with its full capability (where the binaries for
libmagic are installed), use thefulloption:pip install typecode[full]If you want to use the version of libmagic (possibly) provided by your operating
system, use theminimaloption:pip install typecodeIn this case, you will need to provide a working libmagic and its database
available in one of these ways:a typecode-libmagic plugin: See the standard ones athttps://github.com/nexB/scancode-plugins/tree/main/builtinsThese can either bundle a libmagic library and its magic database or expose a
system-installed libmagic.
They do so by providing a plugin entry point as ascancode_location_providerfortypecode_libmagicwhich points to a callable that must return a mapping
with these two keys:‘typecode.libmagic.dll’: the absolute path to a libmagic DLL‘typecode.libmagic.db’: the absolute path to a libmagic ‘magic.mgc’ databaseSee for example:https://github.com/nexB/scancode-plugins/blob/4da5fe8a5ab1c87b9b4af9e54d7ad60e289747f5/builtins/typecode_libmagic-linux/setup.py#L42https://github.com/nexB/scancode-plugins/blob/4da5fe8a5ab1c87b9b4af9e54d7ad60e289747f5/builtins/typecode_libmagic-linux/src/typecode_libmagic/__init__.py#L32environment variables:TYPECODE_LIBMAGIC_PATH: the absolute path to a libmagic DLLTYPECODE_LIBMAGIC_DB_PATH: the absolute path to a libmagic ‘magic.mgc’ databasea system-installed libmagic and its database availale in the system PATH:The supported libmagic version is 5.39.To set up the development environment:source configure --devTo run unit tests:pytest -vvs -n 2To clean up development environment:./configure --cleanTo update Pygment to a newer vendored version use vendy:Update the version of pygments inpyproject.tomlRunvendyUpdate the src/typecpde/pygments_lexers_mapping.py
and src/typecode/pygments_lexers.py scripts accordingly, including their
ABOUT files
Package: type-comparable
AboutModule allows to compare variables not only by value but by type too.Quick example:fromtypingimportAnyfromtype_comparableimportmake_type_comparableresponse={'id':144233,'date_create':'2020-01-25T17:31:33.910803','important_data':'important data','other_data':'other data','inner_data':{'field a':'value a','field d':'value b'},'line':[1,'some text',3]}assertmake_type_comparable(response)=={'id':int,# <-- will compare by type int'date_create':str,# < -- will compare by type str'important_data':'important data',# <-- exact match as is'other_data':Any,# <-- allow any data,'inner_date':{# <-- also work with nested dictionaries'field a':str,'field b':'value b'}'line':[int,Any,3]# <- check elements in array}# if you don't want wrap left variable (response) if can wrap right:assertresponse==make_type_comparable(...)Very useful for tests by pytest.Support typesComparable types (which can be passed tomake_type_comparable()):intboolstrlistdictotherTypes for comparison:all python builtin (int,str,bool,list,dict, etc.)objectandtyping.Any- mean any type but notNonetyping.Optional- mean any type andNone.Optional[int]now not supportedAlso you can try to use with your custom types but without guaranteed (verify
manually before use in product)Know issuesWrappedNoneis notNone:-(>>make_type_comparable(None)isNoneFalse# use equal>>make_type_comparable(None)==NoneTrueInstallFrom PyPi:$pipinstalltype_comparableFrom local:# update setuptools$pipinstall'setuptools >= 30.4'# do install$makeinstall# or$pipinstall.DevelopmentPrepare and activate virtual environment like:$python3-mvenv.env# for bash$source.env/bin/activate# for fish$..env/bin/activate.fishUpdate pre-install dependencies:$pipinstall'setuptools >= 30.4'Install:$makeinstall_dev# or$pipinstall--editable.[develop]Run tests:$maketest# or$pytesttests/
Package: typeconf
TypeConfA static configuration parser for python using templatesPython is as a dynamic programming language inherently prone to runtime errors. This  is especially problematic for long-running programms. A wrong configuration then can lead to the loss of precious computation.Sounds familiar?TypeConf builds a configuration parser from templates, that can be hierarchical nested to define your individual configuration. This template can be easily parsed then at the beginning of your code and checked for your individual requirements.Furthermore, TypeConf helps maintain up-to-date configurations by quickly revealing broken configurations and making easy to support old configurations despite changes.InstallationFrom PyPipip install typeconfFrom sourcepip install git+https://github.com/kilsenp/TypeConf.gitDemo# templates/parent.yamlattr_int:dtype:intrequired:Falsehelp:"Thisisanint"default:0type:"datatype"attr_child:dtype:childrequired:Falsehelp:"Thisatypeconstructedfromanotheryaml"type:"datatype"# templates/child.yamlattr_bool:dtype:boolrequired:Truehelp:"Thisisabool"type:"datatype"TypeConf will be automatically be able to solve the dependencies when building the type.# main.pyfromtypeconfimportTypeFactoryfactory=TypeFactory()factory.register_search_directory('templates')template=factory.build_template('parent')We can now pass a config file to be parsed.# config.yamlattr_child:attr_bool:Truetemplate.fill_from_file('config.yaml')This values can also be overwritten by command line arguments, addressing subconfigs through dot separated names.fromargparseimportArgumentParserparser=ArgumentParser()parser.add_argument('task')# python main.py test attr_child.attr_bool=Falseargs,unknown_args=parser.parse_known_args()# args.task = testtemplate.fill_from_cl(unknown_args)Finally we create the config that can be used throughout the rest of the code.config=template.to_config()# Actual parsing happens here# {#    attr_int: 0,#    attr_child: {#       attr_bool: False  #overwritten by cli#    }# }FeaturesStatic configuration parsing before program is startedEasy verification of existing configurations, if they still work with the current pipelineEasy extension of existing configurations by adding default values to templatesAutomatically make types within a subfolder choosableComment individual configuration valuesOverwrite values using the command line or from codeData type testing, ensure the correct datatype:intfloatstrboolTODOclean split between types, attributes, special typesConsistent namingAllow more combinations e.g. choice of + datatypebetter error messagesconfig from python fileunit tests@config_file('path_to_cfg')eval and type are not exclusive. make additional attributeBetter name parser instead of type?Pretty print with commentsCommand line interfaceConditional requirements. If a is set b also has to be set. Better if b is a part of a? Leads to duplicatesGeneration of a seed.Pip PackageGithub ServicesCopy From to ensure same training as validation, or make it as default?ensure two values are equal, but then why even set two?Config updates, pass multiple configs
Package: type_constraint
from type_constraint import BasicCheck, CheckMeta, Checkclass A:__metaclass__ = CheckMeta()def f(self, i, j):"""@param i str@param j str"""return i + ja = A()a.f('1', '2')@BasicCheckdef test_func(i, j):"""this is a test function for type constraint@param i int   :this is the first operand@param j float :this is the second operand@return float"""return i / j
Package: typeconstraints
Type Constraints Decorator.Python decorator for adding function argument type constraint checks to function invocations.Using the typeconstraints decorator allows you to defensively use asertions of argument typesand return value types of functions and methods.The module allows the use of custom type constraint asertion classes and comes with a small setof pre-defined type constaint asertion classes.Basic usage:from typeconstraints import typeconstraints,ARRAYOF@typeconstraints([int,str,ARRAYOF(int)])def simple_function(foo,bar,baz):passsimple_function(42,"hi there",[1,1,2,3,5,8,13,21])For more information on usage, consult the tutorial here:https://steemit.com/@mattockfs
Package: typeconvert
type-converterConvert various unsigned integers to non-native Python or Numpy types.function typesFor each conversion, there are two kinds of functions to import:typeconvert.func:  scalar functionstypeconvert.ufunc: numpy universal functions (ufunc)Choose what kind of function to import:fromtypeconvert.funcimport<function_name_here>fromtypeconvert.ufuncimport<function_name_here>scalar functionsThe scalar functions take unsigned Pythonintas inputs and return either anintor Pythofloatas appropriate.numpy universal functionsThe numpy universal functions take the minimum-sized np.uint<> for the given type, and return the minimum-sized np.uint<> or np.float<> for the dynamic range of the output.examplesTwo's-ComplementIn[1]:fromtypeconvert.funcimporttwoscompIn[2]:twoscomp(0x00,8),twoscomp(0xFF,8),twoscomp(0x7F,8),twoscomp(0x80,8)Out[2]:(0,-1,127,-128)MIL-STD-1750A32In[3]:fromtypeconvert.funcimportmilstd1750a32In[4]:milstd1750a32(0x40000000),milstd1750a32(0x80000000),milstd1750a32(0x9FFFFF04)Out[4]:(0.5,-1.0,-12.000002)