Saravanan666/pypi-org huggingface dataset:
Package: ginodantic
Generate pydantic schema from gino modelsPython 3.7+Install:pip install ginodanticGithub:https://github.com/Basalex/ginodanticGenerating custom schemasMeta Class Optionsas_dataclass: bool-> pydantic dataclass will be used for generated schemaas_list_fields: Tuple[str]-> listed fields will be generated as List[type]field_methods: bool-> int and float fields will be generated with postfix __ge, and postfix __le,field_methods_by_name: Dict[str, List[str]]-> use database field names instead of model field namesfields: Tuple[str]-> only listed fields will be used for generated schemafield_methods: Tuple[str]-> excludes listed fields from generated schemaexclude: Tuple[str]-> excludes listed fields from generated schemalist_pk: bool-> Foreign key and primary key will be interpreted as listrequired: Tuple[str]-> only listed fields will be defined as required, can be set as empty tupleuse_db_names: bool-> use database field names instead of model field namesExamples of usage:fromginodanticimportBaseModelSchemaclassUserSchema(BaseModelSchema):classMeta:model:Userrequired:()exclude:('email',)use_db_names:Falsefield_methods_by_name={'age':('le','ge')}This would be almost equal to the following schemaclassUserSchema(BaseModel):id:Optional[int]=Noneusername:Optional[str]=Noneage__le:Optional[str]=Noneage__ge:Optional[str]=None
Package: gino-factory
Install:pip installgino-factoryGithub:https://github.com/Basalex/gino_factoryUsage:Let’s create two gino modelsclassTeam(db.Model):__tablename__='teams'id=db.Column(db.Integer,primary_key=True)name=db.Column(db.String(255))classUser(db.Model):__tablename__='users'id=db.Column(db.Integer,primary_key=True)parent_id=db.Column(sa.Integer,sa.ForeignKey(f'users.id',name='parent_id_fkey'))username=db.Column(db.String(255),nullable=False,unique=True)custom_field=db.Column(db.String(255),nullable=False,unique=True)custom_factory=db.Column(db.String(255),nullable=False,unique=True)Next you need to register this modelfromgino_factoryimportGinoFactoryclassFactory(GinoFactory):passFactory.register(Team)Factory.register(User,custom_field='value',custom_factory=function)Single objectsasyncdeftest():user=awaitFactory.user()assertuser.team_idisnotNoneteam=awaitFactory.test()user=awaitFactory.user(team_id=team)assertteam.id==user.team_idIterator objectsfromitertoolsimportcycleasyncdeftest():teams=awaitFactory.cycle(10).team()users=awaitFactory.cycle(10).user(team_id=iter(teams))assertusers[-1].team_id==teams[-1].idteams=awaitFactory.cycle(3).team()# id: 1,2,3users=awaitFactory.cycle(10).user(team_id=cycle(teams))assert[u.team_idforuinusers]==[1,2,3,1,2,3,1,2,3,1]TreesTree attributes:amount: int = 50 - maximum amount of total membersmax_depth: int = 5 - maximum tree depthtop_parents_amount: int = 3 - Amount of “top” parents (parent_id=None)top_parents: CRUDModel = None - Pre-generated top-parentsparent_field_name: str = ‘parent_id’ - Name of parent fieldFollowing code generates single head tree with max depth of 3asyncdeftest():users=awaitFactory.tree(amount=100,max_depth=3,top_parents_amount=1).user()or you may fill your database with random data using __random__ methodawaitFactory.__random__()This method inserts random data to all registered tables
Package: gino-quart
gino-quartIntroductionAn extension forGINOto supportquartserver.UsageThe common usage looks like this:fromquartimportQuartfromgino.ext.quartimportGinoapp=Quart()db=Gino(app,**kwargs)ConfigurationGINO adds abefore_request,after_requestandbefore_first_requesthook to the Quart app to setup and cleanup database according to
the configurations that passed in thekwargsparameter.The config includes:NameDescriptionDefaultdriverthe database driverasyncpghostdatabase server hostlocalhostportdatabase server port5432userdatabase server userpostgrespassworddatabase server passwordemptydatabasedatabase namepostgresdsna SQLAlchemy database URL to create the engine, its existence will replace all previous connect arguments.N/Aretry_timesthe retry times when database failed to connect20retry_intervalthe interval insecondsbetween each time of retry5pool_min_sizethe initial number of connections of the db pool.N/Apool_max_sizethe maximum number of connections in the db pool.N/Aechoenable SQLAlchemy echo mode.N/AsslSSL context passed toasyncpg.connectNoneuse_connection_for_requestflag to set up lazy connection for requests.N/Aretry_limitthe number of retries to connect to the database on start up.1retry_intervalseconds to wait between retries.1kwargsother parameters passed to the specified dialects, likeasyncpg. Unrecognized parameters will cause exceptions.N/ALazy ConnectionIfuse_connection_for_requestis set to be True, then a lazy connection is available
atrequest['connection']. By default, a database connection is borrowed on the first
query, shared in the same execution context, and returned to the pool on response.
If you need to release the connection early in the middle to do some long-running tasks,
you can simply do this:awaitrequest['connection'].release(permanent=False)ContributingYou're welcome to contribute to this project. It's really appreciated. Pleasefork this project and create a pull requestto thedev branch.Dependency management is done viapoetryPull request for new featuresmustinclude the appropriate tests integrated intests/test_gino_quart.pyYou should format your code. Recommended isblackOlder Quart Versionsgino-quartrequires a quart version higher or equal to quart0.15.1after the 1.1.2 release. This is caused by multiple breaking changes with, amongst other things, exception handling. You can still usegino-quart0.1.1b5for older version.AttributionThe license holder of this extension isTony Wang.This project is an extension toGINOand part of thepython-gino community.
Package: gino-sanic
gino-sanicAn extension for GINO to support Sanic server.This project "gino-sanic" is currently not maintained and needs adoption.Since GINO 1.0, the built-in extensions are now separate projects supported by
the community. This project is copied here directly from GINO 0.8.x for
compatibility. Help is needed to:Keep this project maintained - follow Sanic releases, fix issues, etc.Add more examples and documentation.Answer questions in the community.
Package: gino-starlette
gino-starletteIntroductionAn extension for GINO to support starlette server.UsageThe common usage looks like this:fromstarlette.applicationsimportStarlettefromgino.ext.starletteimportGinoapp=Starlette()db=Gino(app,**kwargs)ConfigurationGINO adds a middleware to the Starlette app to setup and cleanup database according to
the configurations that passed in thekwargsparameter.The config includes:NameDescriptionDefaultdriverthe database driverasyncpghostdatabase server hostlocalhostportdatabase server port5432userdatabase server userpostgrespassworddatabase server passwordemptydatabasedatabase namepostgresdsna SQLAlchemy database URL to create the engine, its existence will replace all previous connect arguments.N/Aretry_timesthe retry times when database failed to connect20retry_intervalthe interval insecondsbetween each time of retry5pool_min_sizethe initial number of connections of the db pool.N/Apool_max_sizethe maximum number of connections in the db pool.N/Aechoenable SQLAlchemy echo mode.N/AsslSSL context passed toasyncpg.connectNoneuse_connection_for_requestflag to set up lazy connection for requests.N/Aretry_limitthe number of retries to connect to the database on start up.1retry_intervalseconds to wait between retries.1kwargsother parameters passed to the specified dialects, likeasyncpg. Unrecognized parameters will cause exceptions.N/ALazy ConnectionIfuse_connection_for_requestis set to be True, then a lazy connection is available
atrequest['connection']. By default, a database connection is borrowed on the first
query, shared in the same execution context, and returned to the pool on response.
If you need to release the connection early in the middle to do some long-running tasks,
you can simply do this:awaitrequest['connection'].release(permanent=False)
Package: gino-tornado
gino-tornadoAn extension for GINO to support Tornado server.This project "gino-tornado" is currently not maintained and needs adoption.Since GINO 1.0, the built-in extensions are now separate projects supported by
the community. This project is copied here directly from GINO 0.8.x for
compatibility. Help is needed to:Keep this project maintained - follow Tornado releases, fix issues, etc.Add more examples and documentation.Answer questions in the community.
Package: ginput-glisignoli
GInputThis is just a simple (and dirty) python script that will take input from a string, piped stdin or clipboard and send it to a virtual keyboard using libevdevInstallationpython setup.py installUsageusage: ginput [-h] [-s STRING] [-c]

Type a string to virtual input device

options:
  -h, --help            show this help message and exit
  -s STRING, --string STRING
                        The string to send to the virtual input device
  -c, --clipboard       Use contents of the clipboardExamplesType contents of clipboard:ginput -cType contents of string:ginput -s "foo"Type contents of piped input (stdin):echo "foo" | ginput
Package: ginsfsm
NoteThis project is finalized.I’m re-writting the idea of ginsfsm in C language.
The name of the new project is Yuneta, and it will be released soon.Can you draw your development?Can you view the behaviour of your application in real time?With this framework you can!.GinsFSM is a python library to develop systems based in finite-state machines
(http://en.wikipedia.org/wiki/Finite-state_machine).
This model is really useful when writing networking and communication
applications.The idea is very simple:All objects, calledgobj, are instances of a derivedginsfsm.gobj.GObjclass.TheGObjhas an insidesimple-machinethat defines its behavior.The communication betweengobj’s happens viaevent’s.Thus, the nature of this system is fully asynchronous and event-driven.The interface is simple and common to all objects; you just have to change the
name of the event and the data they carry.It includes a full asynchronous http server, wsgi server
and winsocket server/client compatible withsockjs.You can run multiple wsgi applications.Ginsfsm comes with a variety of scaffolds
that you can use to generate a project.LikePyramidframework pcreate/pserve commands,
Ginsfsm provides the gcreate/gserve commands,
to create and run ginsfsm projects.With gcreate command you can create a ginsfsm project.
For example, with multi_pyramid_wsgi scaffold,
you will create a multiple wsgi application project,
one of wsgi application being aPyramidwsgi application.The GObj’s objects are Pyramid “location-aware” resources.
Also, the gobj’s are a hierarchical tree,
also therefore the use of traversal dispatching are all natural.Support and DocumentationSee the <http://ginsfsm.org/> to view documentation.Code available in <https://bitbucket.org/artgins/ginsfsm>LicenseCopyright (c) 2012, Ginés Martínez Sánchez.GinsFSM is released under terms of The MIT
License <http://www.opensource.org/licenses/mit-license>
Package: gint
gintA Python class for (large) polynomials over GF(2), based on Python's built-in integers, efficiently implemented in CThe purpose of this package is to support polynomial algebra over GF(2). The
polynomial field is infinite, operations are NOT computed modulo anything.The package does not depend on numpy nor any other package, instead Pythons built-in variable-sized integers are
used. A Python subclassgintis derived from the built-inintwhere the appropriate
operators +, -, *, /, %, divmod are defined. Exponentiation with standard
integer exponent using ** operator is also allowed. Boolean operators &, |, ^
are supported, even with integers (returning gint). Shift operators with
integer shift are allowed.There is a performance penalty due to the Python integer design being based
on 15- or 30-bit chunks. However the generic implementation in C still performs
way better than any pure Python implementation, especially for large polynomials.
Package: ginteract
# Git CheckoutAn interactive Git client!<a href="https://asciinema.org/a/ByGs7AeXHOlUMIKMjHmM7N9k5" target="_blank"><img src="https://asciinema.org/a/ByGs7AeXHOlUMIKMjHmM7N9k5.png" /></a>## InstallationRequirements: Python 3.*Run this scripts https://git.io/fNfqh:```wget -L https://git.io/fNfqh -O- | bash```## Usage```git ch  # checkout a branchgit mg  # merge a branch into current branchgit dl  # delete branches# or use the commands directlyginteract checkoutginteract mergeginteract delete```## TODO- [x] Add GIF- [x] Add tests- [x] Bash script to install- [x] Add delete support- [x] Add merge support- [ ] Remote support
Package: ginz
GinzGinz is a command-line tool for cloning multiple repositories from GitHub based on a configuration file. It simplifies the process of cloning multiple repositories by allowing you to specify the repositories and their branches in a single configuration file.FeaturesClones multiple repositories from GitHub.Supports specifying the branch for each repository.Provides progress updates during the cloning process. (Coming)Easy-to-use command-line interface.(Coming)Customizable through a configuration file.InstallationEnsure that Python 3.x is installed on your system.Open a terminal or command prompt.Run the following command to install Ginz:Viapippipinstallgit+https://github.com/happer64bit/ginz-cliUsageCreate a configuration file namedGinz.tomlin the desired directory. The file should be in the TOML format.Add repository entries to the configuration file in the following format:[repository-name]source="https://github.com/username/repository-name"branch="main"Replace[repository-name]with a unique name for each repository,sourcewith the GitHub repository URL, andbranchwith the desired branch name (optional, defaults to "main").Open a terminal or command prompt.Navigate to the directory containing theGinz.tomlconfiguration file.Run the following command to start the cloning process:ginzGinz will read the configuration file, clone the specified repositories, and display progress updates during the cloning process.OptionsGinz supports the following command-line options:--versionor-v: Prints the version of Ginz.--helpor-h: Displays help information and usage instructions.--refetch: Update All Repo inGinz.toml--config-url <url>: Fetch Config and runExampleLet's assume you have the followingGinz.tomlconfiguration file:[project-a]source="https://github.com/user-a/project-a"branch="main"[project-b]source="https://github.com/user-b/project-b"branch="development"Running the commandgintin the directory containing theGinz.tomlfile will cloneproject-afrom themainbranch andproject-bfrom thedevelopmentbranch.
Package: ginzyenc
Mofied the original yenc module by Alessandro Duca & saphirefor use within ginzibix.The module was extended to do header parsing and full yEnc decoding from a Python
list of chunks, the way in which data is retrieved from usenet.Currently CRC-checking of decoded data is disabled to allow for increased performance.
It can only be re-enabled by locally altering ‘sabyenc.h’ and setting ‘CRC_CHECK 1’.
Package: gio
gioGeoscience I/O for grids and horizons.The goal of this project is to load and save various geoscience surface data formats (2D and 3D seismic horizons, grids, etc). The interchange formats are thexarray.DataArray(andxarray.Datasetwhere we need a collection of arrays). This format is convenient because it allows us to store a NumPy array with Pandas-like indexing (as opposed to ordinary NumPy positional indexing).We've started with:OpendTect horizonsZMAP gridsSurfer gridsPetrel horizonsWhat formats would you like to see?Make an issue.InstallationThis library is on PyPI, so you can install it with:pip install gioTo get the latest unstable release, you can install it from GitHub:python -m pip install --upgrade https://github.com/agilescientific/gio/archive/develop.zipBasic usageIn general, there's a reader for each supported file format. The reader produces anxarray.DataArray, orxarray.Datasetif the format supports multiple surfaces in one file.importgioda=gio.read_surfer(fname)da.plot()DocumentationSeethe documentationfor more examples, and for help developinggioor making contributions back to this project.
Package: giofile
Opens a Gio.File as a Python file objectdefopen(file,mode="r",buffering=-1,encoding=None,errors=None,newline=None,cancellable=None):"""
    Like io.open() but takes a Gio.File instead of a filename.

    The only modes supported are r/rw/rb/r+b
    Takes a cancellable kwarg for passing a Gio.Cancellable().
    Cancelling it will abort any ongoing blocking operation.

    Returns a io.IOBase instance.
    """Installationpip install giofileExampleimportmutagenimportgiofilefromgi.repositoryimportGiogio_file=Gio.File.new_for_uri("http://people.xiph.org/~giles/2012/opus/ehren-paper_lights-96.opus")cancellable=Gio.Cancellable.new()withgiofile.open(gio_file,"rb",cancellable=cancellable)asgfile:print(mutagen.File(gfile).pprint())$pythonexample.pyOggOpus,228.11seconds(audio/ogg)ENCODER=opusencfromopus-tools0.1.5artist=EhrenStarkstitle=PaperLightsalbum=LinesBuildWallsdate=2005-09-05copyright=Copyright2005EhrenStarkslicense=http://creativecommons.org/licenses/by-nc-sa/1.0/organization=magnatune.com
Package: giokoda
This is aPythonbased utility for geocoding csv files
using various online geocoding service.InstallationInstallation usingpippip install giokodaInstallation from sourceDownload the source code from github, Examplegit clone https://github.com/WorldBank-Transport/giokoda.gitInstall the module and its dependanciescd giokoda
python setup.py installUsageThis utility can be used as a Python module or as an executable script.Using as python moduleBasic example:import giokoda
giokoda.geocode_csv('input.csv')The above code will try to goecode the provided‘input.csv’file and write
its output to‘input.csv-geocoded.csv’Ageocode_csvfunction can geocode entities from a provided input csv file
and write results to a csv file.It also returns a dictionary containing error, success and total count of
geocoded rows.General syntax:geocode_csv('input/file.csv', **kwargs)Required parameterinfile,(filepath/str)path to a csv file to geocode.Optional keyword arguments (**kwargs)outfile, (filepath/str)path to file to write output csvservice,(str), default:‘nominatim’.Name of a geocoding service to use. This can be a name of any geocoding
service that is supported bygeopy.query_column,(str), default:‘name’Name of a column containg text to geocode.query_columns(list): default:[]. A list of a columns
to be combined in order to produce a text to geocode.service_kwargs,(dict)Optional keyword arguments for initialization of geocoding service.delimiter(str): default:‘,’, A one-character string used to
separate fields.quotechar(str): default:‘”’, A one-character string used to
quote fields containing special characters in a csv file, such as
the delimiter or quotechar, or which contain new-line characters.Returngeocode_csv()returns a dictionary of success, error and total count:{
    'total': 0,
    'success': 0,
    'error': 0
}Using an executable scriptRungeocode_csvvia command line interface.Example:geocode_csv /input/file.csvor including a api key:geocode_csv --service <SERVICE-NAME> --params '{"api_key": "<YOUR-API-KEY>"}' /input/file.csvGeneral usage:geocode_csv [-h] [-o OUTPUT] [-s SERVICE] [-c COLUMN] [-p PARAMS] inputRequired argumentinputFull path to csv file to geocodeOptional arguments-h, –helpshow this help message and exit-o OUTPUT, –output OUTPUTFull path to output file-s SERVICE, –service SERVICEGeocoding service name, example arcgis, baidu, google, googlev3, geocoderdotus,
geonames, yahoo, placefinder, opencage, openmapquest, mapquest, liveaddress,
navidata, nominatim, geocodefarm, what3words, yandex and ignfrance-c [COLUMN [COLUMN …]], –column [COLUMN [COLUMN …]]Name(s) for column(s) containing text content to geocode.
Multiple column names should be separated by white space.-p PARAMS, –params PARAMSKeyword arguments for geocoding service initialization presented as
json object-d DELIMITER, –delimiter DELIMITERA one-character string used to separate fields in a csv file-q QUOTECHAR, –quotechar QUOTECHARA one-character string used to
quote fields containing special characters in a csv file, such as
the delimiter or quotechar, or which contain new-line characters.
Package: gios
giosPython wrapper for getting air quality data fromGIOŚ (Główny Inspektorat Ochrony Środowiska)How to find station_idgo tohttp://powietrze.gios.gov.pl/pjp/currentfind on the map a measurement station located closest to your homego to "More infotmation" linklook at site address, for ex. for this addresshttps://powietrze.gios.gov.pl/pjp/current/station_details/table/10124/3/0station_idis 10124How to use package"""Example for GIOS."""importasyncioimportloggingfromaiohttpimportClientError,ClientSessionfromgiosimportApiError,Gios,InvalidSensorsData,NoStationErrorGIOS_STATION_ID=568logging.basicConfig(level=logging.DEBUG)asyncdefmain()->None:"""Run main function."""asyncwithClientSession()aswebsession:gios=Gios(GIOS_STATION_ID,websession)try:data=awaitgios.async_update()except(ApiError,NoStationError,InvalidSensorsData,ClientError)aserror:print(error)returnlatitude=gios.latitudelongitude=gios.longitudestation_name=gios.station_nameprint(f"Longitude:{longitude}")print(f"Latitude:{latitude}")print(f"Station name:{station_name}")print(data)loop=asyncio.get_event_loop()loop.run_until_complete(main())loop.close()
Package: gio-tracker
GrowingIO提供在Python Server端部署的SDK，从而可以方便的进行事件上报等操作，针对 saas 平台。Installation可以使用 pip 下载我们的sdk:pip install gio_trackerGetting Started简单示例:from gio_tracker import GrowingTracker

# 方式1：使用默认配置
growing_tracker = GrowingTracker('<product_id>')

# 方式2: 自定义发送策略
from gio_tracker import DefaultConsumer
default_consumer = DefaultConsumer('<product_id>')
growing_tracker = GrowingTracker.consumer(default_consumer)
Package: giotto
What is Giotto?Giotto is a python web framework. It encourages a functional style where model, view and controller code is strongly decoupled.Key Features of Giotto include:Extremely terse code. A full featured blog application is under 300 lines of code (including templates)Generic views, generic models and multiple pluggable controllers.Free RESTful interface along with your normal “browser POST” CRUD site.Functional CRUD patterns that do away with the need for django-style form objects.Automatic URL routing.Built in cache (supports Redis and Memcache, and an API for supporting any other engines)SQLAlchemy for database persistence.Jinja2 for HTML templates (with an API for extending for other template engines)Getting startedInstall and create base project files:pip install giotto
mkdir demo
giotto create httpNow your project is initialized. Open themanifest.pyand add the following:from giotto.programs import ProgramManifest, GiottoProgram
from giotto.views import jinja_template, BasicView

def multiply(x, y):
    x = int(x or 0)
    y = int(y or y)
    return {'x': x, 'y': y, 'result': x * y}

manifest = ProgramManifest({
    'multiply': GiottoProgram(
        model=[multiply],
        view=BasicView(
            html=jinja_template('multiply.html'),
        ),
    ),
})Now create a file calledmultiply.html:<!DOCTYPE html>
<html>
    <body>
        {{ data.x }} * {{ data.y }} == <strong>{{ data.result }}</strong>
    </body>
</html>Or if you’re too lazy to make a template,
set theviewkeyword argument to justBasicView()to use the generic view.Run the development server:$ giotto http --runPoint your browser tohttp://localhost:5000/multiply?x=3&y=3.
Additionaly, tryhttp://localhost:5000/multiply.json?x=3&y=3.
You can also invoke your multiply program through the command line:$ giotto create cmd
$ giotto cmd multiply --x=4 --y=2Also:$ giotto cmd multiply.html --x=4 --y=2You can also use positional arguments:$ giotto cmd multiply/4/6Links:To discuss Giotto, please visit the GoogleGroupRead Giotto’sdocumentation.Check outgiottoblog, a full featured blog application written with the Giotto framework.