Saravanan666/pypi-org huggingface dataset:
Package: etb-pg
PG LibraryA small class for interacting with Postgres databases. Developed for the CS 495 TV Manager project.InitializePass a dictionary with connection credentials when instantiating the PGDB object.conn_dict: dict = {
    "user" : "",        # default $USER
    "password" : "",    # default None
    "host" : "",        # default localhost
    "port" : "",        # default 5432
    "dbname" : ""       # default $USER
}All of the connection params are optional, and default to the regular Postgres defaults (commented above).Optional args are read_only connection (default True) and an SQL directory where the object will check for queries stored as as readable files (default None).UsageYou can execute a query from a file, from a raw string, from a decorated function, or run a very simple select query. As with the actual Postgres database, schema is always an optional argument, and always defaults to "public" if not provided. Results of a query are always returned as a list of dictionaries, in which the column name maps to the value.execute_file_query(): If no SQL directory is passed when the object is created, then it will assume you're passing with an absolute file path. If there is no file extension included in the method call, then it will assume it's looking for a .sql file. If you did pass an SQL directory at instantiation, and you're using .sql file extensions, you can just pass the name of the file as a string without path or extension. For example, if you initialized the PGDB object with sql_dir = '/home/app/SQL', you can execute the query in '/home/app/SQL/my_query.sql' with execute_file_query('my_query').execute_str_query(): Execute a raw string query.str_to_query(): Use this to decorate a function that returns a string. Could be useful for mildly dynamic queries. For example (assuming you have already created a PGDB object called "pg_interface"):@pg_interface.str_to_query
def foo(cols: list[str], identifier: str) -> str:
    columns = ', st.'.join(cols)

    query = f"""select st.{columns}
            from schema.table_name st
            where st.id = '{identifier}'"""
    
    return queryUsing the decorator, foo() will return the result of the query.get_columns(): Not a query function. Will return a list of {column_name : python_type} for the specified schema/table.get_rows(): Will return the results of a query that selects the specified columns from the specified schema/table.There are no methods for doing joins or window functions- I want to keep any logic that's even remotely complex in a version controlled .sql file, or let the user wrap the logic in a decorated function. There's also nothing for creates/updates/deletes or anything like that- I want to leave the real ELT to another application or library or framework better suited for it. You can use the get_rows() method for very simple, unqualified selects from a table (or, preferably, a view or function).
Package: etc42
ETC42-docker-python===================# AuthorsCeSAM (Centre de donnéeS Astrophysique de Marseille) at LAM (Laboratoire d'Astrophysique de Marseille)# About ETC42-docker-python:ETC42-docker-python is a python module use to launch etc42# Requirements1. For Linux users:* python3* virtualenv```pip install --user virtualenv```* docker* The Docker daemon binds to a Unix socket instead of a TCP port. By default that Unix socket is owned by the user root and other users can only access it using sudo. The Docker daemon always runs as the root user.The docker commands used by ETC42-docker-python can not be prefaced with sudoTo use ETC42-docker-python correctly we must create a Unix group called docker and add users to it:```sudo groupadd dockersudo usermod -aG docker $USER```2. For MAC-OS users:* python3* venv```pip install --user venv```* You must have docker on your mac.(see [Mac-OS docker installation](https://docs.docker.com/docker-for-mac/install/))* You have to install XQuartz with command line `brew cask install xquartz` (see [XQuartz installation](https://www.xquartz.org/index.html) for MacPorts or others installations type).__*note*__: don't forget to select __Allow connections from network clients__ on XQuartz preferences (preferences -> security)# Installation1. Create a folder for the project ETC42 that will contain all the files needed to run an instance etc42:```mkdir ETC42cd ETC42```2. Clone the etc42-docker-python repository:```git clone git@gitlab.lam.fr:etc42/etc42-docker-python.git```3. create virtualenv:```virtualenv -p python3 virtualenv_etc42source virtualenv_etc42/bin/activate```or```python3 -m venv virtualenv_etc42source virtualenv_etc42/bin/activate```4. install the python modules and the etc42:```cd etc42-docker-pythonpip install -r pip-requirements.txtpip install -e .```# How to use it1. if it is not started, use the virtual environment created previously:```source virtualenv_etc42/bin/activate```2. launch the etc42:```etc42```To see all etc42 options available:```etc42 -h or --help```# Create sphinx documentation```source virtualenv_etc42/bin/activatecd docssphinx-apidoc -f -o source/ ../etc42/sphinx-build -b latex source/ build/cd buildmake```
Package: etc-activelearning
etc_activelearningA JupyterLab extension that enables data-science instructors to improve teaching by including tasks for students to complete during video lecutres on MOOCsRequirementsJupyterLab >= 4.0.0InstallTo install the extension, execute:pipinstalletc_activelearningUninstallTo remove the extension, execute:pipuninstalletc_activelearningContributingDevelopment installNote: You will need NodeJS to build the extension package.Thejlpmcommand is JupyterLab's pinned version ofyarnthat is installed with JupyterLab. You may useyarnornpmin lieu ofjlpmbelow.# Clone the repo to your local environment# Change directory to the etc_activelearning directory# Install package in development modepipinstall-e"."# Link your development version of the extension with JupyterLabjupyterlabextensiondevelop.--overwrite# Rebuild extension Typescript source after making changesjlpmbuildYou can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.# Watch the source directory in one terminal, automatically rebuilding when neededjlpmwatch# Run JupyterLab in another terminaljupyterlabWith the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).By default, thejlpm buildcommand generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:jupyterlabbuild--minimize=FalseDevelopment uninstallpipuninstalletc_activelearningIn development mode, you will also need to remove the symlink created byjupyter labextension developcommand. To find its location, you can runjupyter labextension listto figure out where thelabextensionsfolder is located. Then you can remove the symlink namedetc_activelearningwithin that folder.Testing the extensionFrontend testsThis extension is usingJestfor JavaScript code testing.To execute them, execute:jlpm
jlpmtestIntegration testsThis extension usesPlaywrightfor the integration tests (aka user level tests).
More precisely, the JupyterLab helperGalatais used to handle testing the extension in JupyterLab.More information are provided within theui-testsREADME.Packaging the extensionSeeRELEASE
Package: etcd3
python-etcd3Python client for the etcd API v3, supported under python 2.7, 3.4 and 3.5.Warning: the API is mostly stable, but may change in the futureIf you’re interested in using this library, please get involved.Free software: Apache Software License 2.0Documentation:https://python-etcd3.readthedocs.io.Basic usage:importetcd3etcd=etcd3.client()etcd.get('foo')etcd.put('bar','doot')etcd.delete('bar')# lockslock=etcd.lock('thing')lock.acquire()# do somethinglock.release()withetcd.lock('doot-machine')aslock:# do something# transactionsetcd.transaction(compare=[etcd.transactions.value('/doot/testing')=='doot',etcd.transactions.version('/doot/testing')>0,],success=[etcd.transactions.put('/doot/testing','success'),],failure=[etcd.transactions.put('/doot/testing','failure'),])# watch keywatch_count=0events_iterator,cancel=etcd.watch("/doot/watch")foreventinevents_iterator:print(event)watch_count+=1ifwatch_count>10:cancel()# watch prefixwatch_count=0events_iterator,cancel=etcd.watch_prefix("/doot/watch/prefix/")foreventinevents_iterator:print(event)watch_count+=1ifwatch_count>10:cancel()# recieve watch events via callback functiondefwatch_callback(event):print(event)watch_id=etcd.add_watch_callback("/anotherkey",watch_callback)# cancel watchetcd.cancel_watch(watch_id)# recieve watch events for a prefix via callback functiondefwatch_callback(event):print(event)watch_id=etcd.add_watch_prefix_callback("/doot/watch/prefix/",watch_callback)# cancel watchetcd.cancel_watch(watch_id)History0.1.0 (2016-09-30)First release on PyPI.
Package: etcd3-fc
python-etcd3Python client for the etcd API v3, supported under python 2.7, 3.4 and 3.5.Warning: the API is mostly stable, but may change in the futureIf you’re interested in using this library, please get involved.Free software: Apache Software License 2.0Documentation:https://python-etcd3.readthedocs.io.Basic usage:importetcd3etcd=etcd3.client()etcd.get('foo')etcd.put('bar','doot')etcd.delete('bar')# lockslock=etcd.lock('thing')lock.acquire()# do somethinglock.release()withetcd.lock('doot-machine')aslock:# do something# transactionsetcd.transaction(compare=[etcd.transactions.value('/doot/testing')=='doot',etcd.transactions.version('/doot/testing')>0,],success=[etcd.transactions.put('/doot/testing','success'),],failure=[etcd.transactions.put('/doot/testing','failure'),])# watch keywatch_count=0events_iterator,cancel=etcd.watch("/doot/watch")foreventinevents_iterator:print(event)watch_count+=1ifwatch_count>10:cancel()# watch prefixwatch_count=0events_iterator,cancel=etcd.watch_prefix("/doot/watch/prefix/")foreventinevents_iterator:print(event)watch_count+=1ifwatch_count>10:cancel()# recieve watch events via callback functiondefwatch_callback(event):print(event)watch_id=etcd.add_watch_callback("/anotherkey",watch_callback)# cancel watchetcd.cancel_watch(watch_id)# recieve watch events for a prefix via callback functiondefwatch_callback(event):print(event)watch_id=etcd.add_watch_prefix_callback("/doot/watch/prefix/",watch_callback)# cancel watchetcd.cancel_watch(watch_id)History0.1.0 (2016-09-30)First release on PyPI.
Package: etcd3-fork
python-etcd3Python client for the etcd API v3, supported under python 2.7, 3.4 and 3.5.Warning: the API is mostly stable, but may change in the futureIf you’re interested in using this library, please get involved.Free software: Apache Software License 2.0Documentation:https://python-etcd3.readthedocs.io.Basic usage:importetcd3etcd=etcd3.client()etcd.get('foo')etcd.put('bar','doot')etcd.delete('bar')# lockslock=etcd.lock('thing')lock.acquire()# do somethinglock.release()withetcd.lock('doot-machine')aslock:# do something# transactionsetcd.transaction(compare=[etcd.transactions.value('/doot/testing')=='doot',etcd.transactions.version('/doot/testing')>0,],success=[etcd.transactions.put('/doot/testing','success'),],failure=[etcd.transactions.put('/doot/testing','failure'),])# watch keywatch_count=0events_iterator,cancel=etcd.watch("/doot/watch")foreventinevents_iterator:print(event)watch_count+=1ifwatch_count>10:cancel()# watch prefixwatch_count=0events_iterator,cancel=etcd.watch_prefix("/doot/watch/prefix/")foreventinevents_iterator:print(event)watch_count+=1ifwatch_count>10:cancel()# recieve watch events via callback functiondefwatch_callback(event):print(event)watch_id=etcd.add_watch_callback("/anotherkey",watch_callback)# cancel watchetcd.cancel_watch(watch_id)# recieve watch events for a prefix via callback functiondefwatch_callback(event):print(event)watch_id=etcd.add_watch_prefix_callback("/doot/watch/prefix/",watch_callback)# cancel watchetcd.cancel_watch(watch_id)History0.1.0 (2016-09-30)First release on PyPI.
Package: etcd3gw
Team and repository tagsetcd3 gateway Python ClientThe etcd3gw library provides a python client for etcd3 grpc-gateway v3 API.License: Apache License, Version 2.0Documentation:https://docs.openstack.org/etcd3gw/latest/Source:https://opendev.org/openstack/etcd3gw/Bugs:https://bugs.launchpad.net/python-etcd3gwRelease notes:https://docs.openstack.org/releasenotes/etcd3gw/
Package: etcd3-rs
python-etcd3Python client for the etcd API v3, supported under python 2.7, 3.4 and 3.5.Warning: the API is mostly stable, but may change in the futureIf you’re interested in using this library, please get involved.Free software: Apache Software License 2.0Documentation:https://python-etcd3.readthedocs.io.Basic usage:importetcd3etcd=etcd3.client()etcd.get('foo')etcd.put('bar','doot')etcd.delete('bar')# lockslock=etcd.lock('thing')lock.acquire()# do somethinglock.release()withetcd.lock('doot-machine')aslock:# do something# transactionsetcd.transaction(compare=[etcd.transactions.value('/doot/testing')=='doot',etcd.transactions.version('/doot/testing')>0,],success=[etcd.transactions.put('/doot/testing','success'),],failure=[etcd.transactions.put('/doot/testing','failure'),])# watch keywatch_count=0events_iterator,cancel=etcd.watch("/doot/watch")foreventinevents_iterator:print(event)watch_count+=1ifwatch_count>10:cancel()# watch prefixwatch_count=0events_iterator,cancel=etcd.watch_prefix("/doot/watch/prefix/")foreventinevents_iterator:print(event)watch_count+=1ifwatch_count>10:cancel()# recieve watch events via callback functiondefwatch_callback(event):print(event)watch_id=etcd.add_watch_callback("/anotherkey",watch_callback)# cancel watchetcd.cancel_watch(watch_id)# recieve watch events for a prefix via callback functiondefwatch_callback(event):print(event)watch_id=etcd.add_watch_prefix_callback("/doot/watch/prefix/",watch_callback)# cancel watchetcd.cancel_watch(watch_id)History0.1.0 (2016-09-30)First release on PyPI.
Package: etcd3-wrapper
etcd3_wrapperA thin wrapper around Python moduleetcd3to make it a little easier to deal with etcd.Warning: The API isn't fully stable and can changed significantly in future.For Example, you want to get an entry from etcd.
You would write something like thisfrometcd3_wrapperimportEtcd3Wrapperclient=Etcd3Wrapper()entry=client.get("/planet/earth")ifentry:# It would print key and value of entry# in bytes format b'....'print(entry.key,entry.value)Outputb'/planet/earth' b'{"population": "7.53 Billion"}'# If you know that the value in etcd is in JSON# format. You can do the followingjson_entry=client.get("/planet/earth",value_in_json=True)ifjson_entry:# Now, entry.value is of type dictprint(entry.key,entry.value)# So, you can do this tooprint(f"Earth population is{entry.value['population']}")Output/planet/earth {"population": "7.53 Billion"}
Earth population is 7.53 Billion
Package: etcdb
Etcd Database DriverPEP 249 compatible driver for EtcdFeaturesetcdb python module to query etcd as an SQL databaseImplements basic SQL: DROP/CREATE DATABASE, CREATE TABLE, SELECT, INSERTetcdb command line clientCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2016-09-21)First release on PyPI.
Package: etcd-cli
etcd-cli CLI for Etcd based on schemasInstallpipinstalletcd-cliExamples$etcd-cli-dsethost--hostfoo.example.com--ip10.130.197.17\--netmask255.255.255.0--gw10.130.197.254--hwaddr6c:ae:8b:60:46:ba\--siteeur-1[INFO]Usingconfigfile:/etc/etcd-cli/etcd-cli.conf[INFO]Loadingtemplate:templates/host.jinja[INFO]Set:/host/foo.example.com/site:eur-1[INFO]Set:/host/foo.example.com/eth0/ip:192.168.0.1[INFO]Set:/host/foo.example.com/eth0/hwaddr:6c:ae:8b:60:46:ba[INFO]Set:/host/foo.example.com/eth0/netmask:255.255.255.0[INFO]Set:/host/foo.example.com/eth0/gw:192.168.0.254[INFO]Set:/hwaddr/3c:ae:6b:60:46:ca/interface:eth0[INFO]Set:/hwaddr/3c:ae:6b:60:46:ca/hostname:foo.example.com
Package: etcd-client-py
etcd Client Binding for Python using RustHow to buildPrerequisiteThe Rust development environment (the 2021 edition or later) usingrustupor your package managerThe Python development environment (3.10 or later) usingpyenvor your package managerBuild instructionFirst, create a virtualenv (either using the standard venv package, pyenv, or
whatever your favorite).  Then, install the PEP-517 build toolchain and run it.pipinstall-Upipbuildsetuptools
python-mbuild--sdist--wheelIt will automatically install build dependencies likematurinand build the wheel and source
distributions under thedist/directory.How to develop and test(TODO: run maturin for an editable setup)
Package: etcd-client-py-test
etcd Client Binding for Python using RustHow to buildPrerequisiteThe Rust development environment (the 2021 edition or later) usingrustupor your package managerThe Python development environment (3.10 or later) usingpyenvor your package managerBuild instructionFirst, create a virtualenv (either using the standard venv package, pyenv, or
whatever your favorite).  Then, install the PEP-517 build toolchain and run it.pipinstall-Upipbuildsetuptools
python-mbuild--sdist--wheelIt will automatically install build dependencies likematurinand build the wheel and source
distributions under thedist/directory.How to develop and test(TODO: run maturin for an editable setup)
Package: etcd-config
FeaturesThis library allows Python applications load configuration from ETCD:Environment dependent valuesValues in different config sets, identified by nameBackendsETCD 2.2.1Installation$pipinstalletcd-configUsageimportetcd_config.loaderconfig=etcd_config.loader.get_overwrites(env='test',dev_params='main.params',etcd_details=dict(protocol=getattr(params,'ETCD_PROTOCOL','http'),host=getattr(params,'ETCD_HOST','localhost'),port=getattr(params,'ETCD_PORT',2379),username=getattr(params,'ETCD_USERNAME',None),password=getattr(params,'ETCD_PASSWORD',None),prefix='/config/your_project'))
Package: etcddump
A dump &amp; load tool for etcd, which respects all key properties (including indexes) of public keys.InstallationYou can install etcddump from sources by cloning this repository and run$sudopythonsetup.pyinstallAlternatively you may use pip:$sudopipinstalletcddumpAfter you’ve installed etcddump, the programetcdumperwill be available on your systemThe only dependency ofetcddumpispython-ectdversion 0.3.0 or later.UsageUsage is really simple and has been thought so that it resembles how most dumper programs work.# dump to stdoutetcdumperdumphttps://etcd.example.com:4001# dump to fileetcdumper--filedump.jsondumphttps://etcd.example.com:4001# restore from fileetcdumper--filedump.jsonrestorehttp://localhost:4001# try to maintain the same indexes as in the original clusteretcdumper--filedump.json--preserve-indexesrestorehttps://etcd.example.com:4001#dump & restore in one command using pipesetcdumperdumphttps://etcd.example.com:4001|etcdumperrestorehttp://localhost:4001
Package: etcDefaultParser
etcDefault==========A parser for /etc/default configuration files which parses these files with abash subshell in order to have 100% of the bash features when including thisconfiguration into an python driven init script.Example-------root@host # cat /etc/default/rcS## /etc/default/rcS## Default settings for the scripts in /etc/rcS.d/## For information about these variables see the rcS(5) manual page.## This file belongs to the "initscripts" package.TMPTIME=0SULOGIN=noDELAYLOGIN=noUTC=yesVERBOSE=noFSCKFIX=noRAMRUN=noRAMLOCK=noroot@host # pythonPython 2.6.6 (r266:84292, Dec 26 2010, 22:31:48)[GCC 4.4.5] on linux2Type "help", "copyright", "credits" or "license" for more information.>>> import etcDefault>>> etcDefault.read('/etc/default/rcS'){'UTC': 'yes','RAMLOCK': 'no','SULOGIN': 'no','VERBOSE': 'no','TMPTIME': '0','RAMRUN': 'no','FSCKFIX': 'no','DELAYLOGIN': 'no','PIPESTATUS': ['0']}>>>You get all variables set during the run of the /etc/default script into a dict.
Package: etcdfs
Aboutetcdfsis a simple FUSE filesystem based on etcd. It allows you to mount the
key space of an etcd cluster as a filesystem.The main goal of this project is to be able to work with etcd with well-known
Linux tools, likels,cp,grep, rather thanetcdctlor any
other etcd command-line client.etcdfscan also be useful in case a very simple shared storage is required,
like in the case of common configuration.How it worksetcdfscan mount the whole etcd hierarchical key space (/) or any part
of it. Etcd keys are mapped to FS files and etcd directories are mapped to FS
directories.InstallationFirst you will need to install FUSE fromhttp://github.com/libfuse/libfuse.
After installing FUSE, install theetcdfsPython package:$ python setup.py installHow to useSimply runetcdfsand provide the mountpoint and the etcd keyspace that
you want to mount:$ etcdfs –basedir $basedir $mountpointUnmount the filesystem by usingfusermount:$ fusermount -u $mountpointUnsupported OperationschmodchowngetxattrioctllinklistxattrreadlinkremovexattrrenamesetxattrstatfssymlinkutimensLicenseFree software: BSD license
Package: etcdgo
Introductionetcdgo is a library to push/pull configurations insideetcddatabases. Supported filetypes are the following:JSONYamlINIUsage example:importetcd3importetcdgoclient=etcd3.Etcd3Client(host='127.0.0.1',port=4003)# push a json configuration inside databaseconfig=etcdgo.get_config(client,"json")config.push("myconfig","myfile.json")# push a yaml configuration inside databaseconfig=etcdgo.get_config(client,"yaml")config.push("myconfig","myfile.yaml")# push a ini configuration inside databaseconfig=etcdgo.get_config(client,"ini")config.push("myconfig","myfile.ini")# pull data from etcd databasedata=config.pull("myconfig")To install the library:pipinstalletcdgoPush/pull via command lineetcdgo library contains a tool calledetcdgo-cliwhich can be used to
push/pull configurations inside an etcd database.# push ini configuration$etcdgo-cli\--hostname10.0.1.21\--port2379\--basefile/configs\pushpytest0pytest.ini# pull configuration$etcdgo-cli\--hostname10.0.1.21\--port2379\--basefile/configs\pull--output-type=inipytest0[pytest]addopts=-vv-slog_cli=Truelog_level=DEBUGetcdgo-cliwill automatically recognize the file extension and push it as
needed, but pull command needs to specify the output type, via--output-typeoption.How data is storedBefore pushing configurations inside an etcd database, all files are converted
into a dictionary and then flatten. Thebasefolderis given to the configuration
object and it's the root of our configurations.For example:importetcd3importetcdgoclient=etcd3.Etcd3Client(host='127.0.0.1',port=4003)config=etcdgo.get_config(client,"ini",basefolder="/configs")config.push("foods","myconfig.ini")Ourmyconfig.iniconfiguration:[apple]color=redtaste=sweet[coffee]color=blacktaste=bitterOncemyconfig.iniis pushed into etcd, it will be flatten as following:/configs/foods/apple/color = 'red'
/configs/foods/apple/taster = 'sweet'
/configs/foods/coffee/color = 'black'
/configs/foods/coffee/taste = 'bitter'Yaml/JSON configurations are flatten with the same principle. In this case,lists are stored as strings.For example:importetcd3importetcdgoclient=etcd3.Etcd3Client(host='127.0.0.1',port=4003)config=etcdgo.get_config(client,"json",basefolder="/configs")config.push("foods","myconfig.json")Ourmyconfig.jsonconfiguration:{"fruits":{"apple":{"color":"red","taste":"sweet"},"coffee":{"color":"black","taste":"bitter"},},"sets":["fruits","vegetables"]}Oncemyconfig.jsonis pushed into etcd, it will be flatten as following:/configs/foods/fruits/apple/color = 'red'
/configs/foods/fruits/apple/taster = 'sweet'
/configs/foods/fruits/coffee/color = 'black'
/configs/foods/fruits/coffee/taste = 'bitter'
/configs/foods/sets = '["fruits", "vegetables"]'