Saravanan666/pypi-org huggingface dataset:
Package: dbq
dbqRun Databricks queries from your terminal or editor.Installation and configurationpip3 install dbqNote: libsasl2 is required on your system. On Ubuntu, get it throughsudo apt-get install libsasl2-dev.Configuration instructions will be displayed when you rundbq.Usagedbq [QUERY]Interactive sessionRundbq(withoutQUERY) to start an interactive REPL. Readline is supported, a history file is kept in~/.dbq_history.Read query from stdinSpecify-forQUERY. Useful for editor integrations; see next section.Integrating with vimThis example bindsctrl+sto running the selected text as a query (visual mode) or the subquery that is under the cursor (normal mode).nnoremap <C-s> vi(:w !dbq -<cr>
vnoremap <C-s> :w !dbq -<cr>Development and contributingFor developmentpipenvis required on your system. Set up the development environment withmake develop, run withpipenv run dbq ...as needed. When submitting pull requests, ensure thatmake lintcomes back clean; you can auto format the code withmake format.We welcome pull requests; if you are planning to perform bigger changes then it makes sense to file an issue first.SecurityFor sensitive security matters please contactsecurity@getyourguide.com.LegalCopyright 2019 GetYourGuide GmbH.dbq is licensed under the Apache License, Version 2.0. SeeLICENSEfor the full text.
Package: db-query
# db_queryPython3 module for comfortable using of database (tested for sqlite3)Usage:import db_querytable = db_query.Table(sqlite3.connect('datebase.db'), 'tablename')table.where(column1=value1, column2=value2) # -> list of rows matching given equalitiestable.where(column1=(value11, value12), column2=value2) # -> executes 'SELECT * FROM tablename WHERE (column1 = value11 OR column1 = value12) AND column2 = value2' and returns resulttable.where_raw('column1 LIKE "val%1" AND column2 = "kek"') # "raw" sql query (beware of vulnerabilities)table(...) # -> table.where(...)table.insert(value1, value2, ...) # insert new row into tabletable.insert(column1=value1) # this also works - can be used if columns have default valuestable.where(...).select(column1, column2) # executes 'SELECT column1, column2 FROM tablename WHERE ...' (and returnes result)table.where(...).select() # -> table.where(...)table.where(...).column1 # -> [_[0] for _ in table.where(...).select('column1')]table.where(...)['column1'] # sametable.where(...).update(column1=value1, column2=value2) # update tabletable.where(...).column1 = new_value # -> table.where(...).update(column1=new_value)table.where(...).delete() # delete matching rowstable.delete(*args, **kwargs) # same
Package: db-querybuilder
Database Query BuilderA library that serves as a means of connecting to a database and executing sql statements.Installation 😀📚pip install db_querybuilderGet startedHow to useDatabase Query BuilderIt is very important to make the connection to the database that we are going to use.New Version updatedNew updated version0.2.0Now with Sqlite integration. If you will use the sqlite integration, I invite you to read the official sqlite documentation, to see the types of data that it allows to use.fromdb_querybuilderimportDatabaseQueryBuilderclassTestUser():def__init__(self)->None:self.id=-1self.first_name='Jhon'self.last_name='Doe'if__name__=='__main__':db=DatabaseQueryBuilder(db_user='root',db_password='',db_database='test',db_port=3306)# Query to jsonquery=db.setTable('test_data').query().where(clausule='id',parameter=1).toJson()print(query)# Query selectquery=db.select(['id','first_name']).from_('test_data').where('email','emaffini0@mlb.com').results()print(query)# Insert data with attributes objectuser=TestUser()query=db.insert(table='test_data',object=user)print(query)# Intregration with sqlite# New version with sqlite queriesdbSqlite=DatabaseQueryBuilder(db_database='./db/hmi_creatio',driver=DatabaseDrivers.DRIVER_SQLITE.value)dbSqlite.setTable('test_data')query=dbSqlite.createTable(columns=['id integer primary key autoincrement','name varchar(40)']).insert(fields=['id','name'],values=[1,'Jhon Doe'])print(query)query=dbSqlite.select(fields=['id','name']).toJson()print(query)
Package: dbr
What You Should Know About Dynamsoft Barcode ReaderDynamsoft Barcode Reader SDKenables you to efficiently embed barcode reading functionality in your
web, desktop or mobile application using just a few lines of code.
Saving you months of added development time and resources, our SDK can
create high-speed and reliable barcode scanner software applications to
meet your business needs.About Python Barcode SDKThe Python Barcode SDK is a wrapper for Dynamsoft C++ Barcode SDK. It comes with all the general
features of Dynamsoft Barcode Reader, bringing convenience for Python developers.Version9.6.30Supported PlatformsWindows x64Linux(x64, ARM32, ARM64)macOS(10.15+)Supported Python VersionsPython3.6Python3.7Python3.8Python3.9Python3.10Python3.11Installationpip install dbrSupported SymbologiesLinear Barcodes (1D) :Code 39(including Code 39 Extended)Code 93Code 128CodabarInterleaved 2 of 5EAN-8EAN-13UPC-AUPC-EIndustrial 2 of 5MSI CodeCode 112D Barcodes :QR Code(including Micro QR Code)Data MatrixPDF417(including Micro PDF417)Aztec CodeMaxiCode(mode 2-5)DotCodePatch CodePharmacodeGS1 Composite CodeGS1 DataBar :OmnidirectionalTruncatedStackedStacked OmnidirectionalLimitedExpandedExpanded StackedPostal Codes :USPS Intelligent MailPostnetPlanetAustralian PostUK Royal MailQuick Startfromdbrimport*# Apply for a trial license: https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=githublicense_key="Input your own license"image=r"Please input your own image path"BarcodeReader.init_license(license_key)reader=BarcodeReader()try:text_results=reader.decode_file(image)iftext_results!=None:fortext_resultintext_results:print("Barcode Format : ")print(text_result.barcode_format_string)print("Barcode Text : ")print(text_result.barcode_text)print("Localization Points : ")print(text_result.localization_result.localization_points)print("Exception : ")print(text_result.exception)print("-------------")exceptBarcodeReaderErrorasbre:print(bre)Sample Codehttps://github.com/Dynamsoft/barcode-reader-python-samplesDocumentationAPIUser GuideRelease NotesContact Ussupport@dynamsoft.com
Package: dbreak-redis
dbreak-redisA plugin fordbreakthat allows it to work withRedisobjects.InstallationInstall from PyPi using pip:pip install dbreak-redisUsageThere's no need to import the plugin separately, just pass aRedisobject to dbreak.show_console().import redis
import dbreak

# Set up a localhost Redis connection
# This assumes you've got a Redis database running
connection = redis.Redis()

# Pause execution and enter the console
dbreak.start_console(connection)You can use most valid Redis commands:db[0]> set mykey myvalue

True

db[0]> get mykey

b'myvalue'Use single or double quotes if you need to set a value with whitespace:db[0]> set mykey "This is my value"

True

db[0]> get mykey

b'This is my value'
Package: dbreak-sqlalchemy
dbreak-sqlalchemyA plugin fordbreakthat allows it to work with SQLAlchemy engine objects.InstallationInstall from PyPi using pip:pip install dbreak-sqlalchemyUsageThere's no need to import the plugin separately, just pass a SQLAlchemy Engine object to dbreak.show_console().import sqlalchemy
import dbreak

# Set up a SQLite SQLAlchemy connection
connection = sqlalchemy.create_engine("sqlite://")

# Pause execution and enter the console
dbreak.start_console(connection)
Package: dbrep
dbrepPackage to sync tables across DBs, i.e. EL in ELT/ETLWhat it isIt is tool for loading data from one DB and uploading into another. That is it. It is the simplest EL-tool.What it is NOTIt is NOT orchestrator. You may use existing one, like Airflow, Prefect or Dagster.It is NOT data transformation tool. You may use DBT or others.It is NOT data ingestion tool -- it won't grab data from external resources.Distinctive featuresSimpleIt does not try to solve miriad of problems, but nicely fits into existing data-engineering stack with (airflow, dbt and other tools).StatelessIt does not store state of jobs or tables, besides connection configs.RobustSince it is stateless there is only a handful of things that could go wrong.Type-awareTypes are not lost in translation. I.e. if it was anumber(10,0)in Oracle, it won't suddenly become aFloat64in ClickHouse.
Package: dbrepo
DBRepoThis is an unofficial Python wrapper for the DBRepo REST API.Source codehttps://github.com/sammchardy/python-binanceDocumentationhttps://python-binance.readthedocs.io/en/latest/Binance API Telegramhttps://t.me/binance_api_englishBlog with examples including asynchttps://sammchardy.github.io
Package: db-report
reporterSimple SQL report generator.After install:$ pip install git+git://github.com/oleglpts/reporter.gitsee directory ~/db_report andhttps://pypi.org/project/xls-report/Requirements:xls-report>=0.0.3, bottle>=0.12.17, pyodbc==4.0.26, pycurl>=7.43.0.3TODO: documentation
Package: dbrew
DBrew: Your Data Product Concoction CompanionBrew and orchestrate your data products seamlessly into actionable deployments with DBrew, the CLI tool tailored for modern data maestros.FeaturesYAML Configuration Validation:Ensures your data product configurations are in check.Automated Documentation Generation:Keeps your project's documentation fresh and updated.Docker Image Creation:Preps your data for deployment with ease.DAG Generation and Deployment:Orchestrates your data workflows smoothly.Getting StartedPrerequisitesEnsure you have Docker installed.Have access to an Airflow instance for DAG deployment.InstallationpipinstalldbrewUsageNavigate to the root of your data product project.Create a dataproduct.yml file with your data product specifications.Run the following command to validate your configuration, generate documentation, create a Docker image, and deploy your DAG:dbrew brewFeedbackWe value your feedback! For bug reports, feature requests, or general queries, feel free to open an issue.ContributeWant to contribute to DBrew? We appreciate your help! Check out the CONTRIBUTING.md file for guidelines.LicenseDBrew is licensed under the MIT License. See the LICENSE file for details.
Package: dbrownell-devtools-test2
dbrownell_devtools_test2Action Items Before Deploying this CodeThe code in this directory has been automatically generated based on acookiecuttertemplate. Additional steps must be completed before this code can be deployed.Please complete these steps and remove these instructions before deploying this code.Gist to store dynamic build informationBugBug: DescCreate the gistNavigate tohttps://gist.github.com/Create a file namedREADME.mdwith the contentsGist used bu GitHub Action workflows to store and retrieve dynamic information (oftentimes used to create and display badges).Click theCreate secret gistbuttonCopy the gist id (this will be the hex string at the end of the url associated with the gist that was just created)Save the gist id as a GitHub Actions SecretNavigate tohttps://github.com/davidbrownell/dbrownell_devtools_test2/settings/secrets/actionsClick theNew repository secretbutton in theRepository secretssectionEnterGIST_IDforNameCopy the gist id forSecretClick theAdd secretbuttonUpdate GitHub Workflow PermissionsNavigate tohttps://github.com/davidbrownell/dbrownell_devtools_test2/settings/actionsIn the sectionWorkflow permissions...SelectRead and write permissionsClick theSavebuttonUpdate this file with your gist idIn this file, replace__YOUR_GIST_ID_HERE__with the hex string copied above.PyPi TokenBugBug: DescCreate the PyPi TokenNavigate tohttps://pypi.orgLogin or Create an account (if necessary)Click theAccount settingslinkClick theAdd API tokenbuttonForToken name, enterGitHub Publish Action (dbrownell_devtools_test2)ForScope, select one of the following values:Entire account (all projects)if the package has never been published beforeProject: dbrownell-devtools-test2if the package has been published beforeClick theCreate tokenbuttonClick theCopy tokenbuttonSave the token as a GitHub Actions SecretNavigate tohttps://github.com/davidbrownell/dbrownell_devtools_test2/settings/secrets/actionsClick theNew repository secretbutton in theRepository secretssectionEnterPYPI_TOKENforNameCopy the pypi token forSecretClick theAdd secretbuttonBugBug: Usage information here
Package: dbs
DBSGetting startedInstallation:pip install dbsRun with:python3 -m dbs.queryUsingExecute one query:python3 -m dbs.query 'sqlite://:inmemory:' 'sqls/select.sql'Pipe commands together:export DB_HOST='sqlite://:inmemory:'
python3 -m dbs.query $DB_HOST 'sqls/create.sql'
python3 -m dbs.query $DB_HOST 'sqls/select_table_1.sql' | python3 -m dbs.query $DB_HOST 'sqls/select_table_2.sql'How to contribute
Package: dbsamizdapper
DbsamizdapperThe "blissfully naive PostgreSQL database object manager"
This is based on the originaldbsamizdatcode fromhttps://git.sr.ht/~nullenenenen/DBSamizdat/a version of which was previously hosted athttps://github.com/catalpainternational/dbsamizdatFull disclosure: That one (https://git.sr.ht/~nullenenenen/DBSamizdat/which is also on pypi) is definitely less likely to have bugs, it was written by a better coder than I am, the original author is "nullenenenennullenenenen@gavagai.eu"New featuresThis fork is based on a rewrite which I did to better understand the internals ofdbsamizdatas we use it in a few different projects. The changes include:A target pyver of about ~3.10Type hints throughout the codebaseChanged fromABCtoProtocoltype for inheritancePoetry for dependency and build managementCompat with bothpsycopgandpsycopg3Opinionated code formattingblack + isortreplacedlambdassome simplepytestfunctionsand probably many more undocumented changesRunning TestsSpin up a docker containerdocker run -p 5435:5432 -e POSTGRES_HOST_AUTH_METHOD=trust postgres:latestThe db url for this container would be:"postgresql:///postgres@localhost:5435/postgres"Make this the environment variableDB_URL, or add it to the.envfileOriginal READMECheck out the original readme for rationale and how-to documentation
Package: dbscan1d
DBSCAN1Ddbscan1d is a 1D implementation of theDBSCAN algorithm. It was created to efficiently
preform clustering on large 1D arrays.Sci-kit Learn's DBSCAN implementationdoes
not have a special case for 1D, where calculating the full distance matrix is wasteful. It is much better to simply sort
the input array and performing efficient bisects for finding closest points. Here are the results of running the simple
profile script included with the package. In every case DBSCAN1D is much faster than scikit learn's implementation.InstallationSimply use pip to install dbscan1d:pipinstalldbscan1dIt only requires numpy.Quickstartdbscan1d is designed to be interchangable with sklearn's implementation in almost
all cases. The exception is that theweightsparameter is not yet supported.fromsklearn.datasetsimportmake_blobsfromdbscan1d.coreimportDBSCAN1D# make blobs to test clusteringX=make_blobs(1_000_000,centers=2,n_features=1)[0]# init dbscan objectdbs=DBSCAN1D(eps=.5,min_samples=4)# get labels for each pointlabels=dbs.fit_predict(X)# show core point indicesdbs.core_sample_indices_# get values of core pointsdbs.components_Notesdbscan1d can return different group numbers than sklearn for non-core points which are within
eps distances of core points for two separate groups. For example:--C1--C1--P--C2--C2Here C1 and C2 are core points for group 1 and group 2, respectively. If P is within eps of both C1 and
C2, dbscan1d will assign it the same label as the core point that is closest. Sklearn doesn't always do this.
Package: dbschema
dbschemais a tool to run MySQL or PostgreSQL migrations
automatically. Using a table, it keeps a state of previous migrations to
avoid duplicates.Features:Support for MySQL and PostgreSQLOptional pre and post-migration queries (for example to update
privileges)Multiple migrations in multiple databases can be processed as one.InstallationInstalldbschema# Install required packagesapt-getupdateapt-getinstall--yeslibpq-devgccpython3-devpip3installdbschemaCreate a config fileCreate the file~/.dbschema.ymland add your databases
configuration.See exampleCreate migrations tabledbschemauses a table calledmigrations_appliedto keep track of
migrations already applied to avoid duplication. See the schema forMySQLorPostgreSQL.Migrations folder structureFor each database, you need to have a migration path (settingpathin the migration file).Within that path you need to create one folder per migration. This
folder must contain a file calledup.sqlwith the SQL queries and
optionally a file calleddown.sqlfor rollbacks./path/to/migrations/db1/
|-- migration1/
|   |-- up.sql
|   |-- down.sql
|-- migration2/
|   |-- up.sql
|...
/path/to/migrations/db2/
|-- migration1/
|   |-- up.sql
|-- migration2/
|   |-- up.sql
|   |-- down.sql
|...UsageApply pending migrationsdbschema# or to specify a config file pathdbschema--config/path/to/config.yml# or to migrate only a specific databasedbschema--tagdb1Rollbackdbschema--tagdb1--rollbackmigration1Example$dbschema*Applyingmigrationsfordb1(`test`onpostgresql)->Migration`migration1`applied->Migration`migration2`applied->Migration`migration3`applied*Migrationsapplied*Applyingmigrationsfordb2(`test`onmysql)->Migration`migration1`applied->Migration`migration2`applied->Migration`migration3`applied*Migrationsapplied$$dbschema--tagdb2--rollbackmigration1*Rollingbackmysql->`migration1`->Migration`migration1`hasbeenrolledback$
Package: dbseeder
Seeder for MysqlLoad database then make seeds for itInstall$pipinstalldbseederUsagefromdbseederimportDatabasedb=Database(host="localhost",user="root",password="",database="seed")# Make seed without deleting the existence datadb.makeSeed(rows_num=100000)# Delete data, then make seedsdb.clearAndMakeSeed(rows_num=100000)OR$python-mdbseeder--hostlocalhost--userroot--password=--databaseseed--rows_num100--dropTODOLoad relationshipAdd testAdd argparserTestpython-mpytestPackingTutorialPackage on PypiMy noteTo publish new version:Change version inpyproject.tomlBuild:python -m buildUpload to testpypi:py -m twine upload --repository testpypi dist/*Upload to pypi:py -m twine upload --repository pypi dist/
Package: dbseeker
DBSeekerDescription:A little but functional script that lets you search on every database of a MySQL server for an input string.
It will print the results in a table format, indicating which table contains the search term, in which database, how many rows were found and the time it took to search.Please note that this project is still in alpha stage, so you may encounter bugs and missing features.Usage:DBSeeker uses argparse to parse  command line arguments.
You can runpython dbseeker.py -hto see this help message:usage: dbseeker.py [-h] -a address -P port -u user [-p password] [-d database | -bl blacklist] -s search


  -h, --help            
                        To show this help message and exit
  -a address, --address address
                        To Enter the host address
  -P port, --port port  
                        To Enter the port
  -u user, --user user  
                        To Enter the user
  -p password, --password password
                        To Enter the password
  -d database, --database database
                        To Enter databases you want to search in
  -bl blacklist, --blacklist blacklist
                        To Enter databases you want to be excluded, separated by commas
  -s search, --search search
                        To Enter the search termPlease note that-dand-blare mutually exclusive;Square brackets indicateoptionalarguments;At the moment DBSeeker will accept a minimum of 3 characters for the search term, but it may be changed in the future;If your search string does include whitespaces, please remember to use quotes.Dependencies:Since 'argparse' and 'time' should be both included in your python environment you just need to install the following dependencies:mysql-connector-pythontabulateas referred in the requirements.txt file.ContributorsAs always, thanks to our amazing contributors!Installation:Inside the project folder, create a new virtual environment, then simply runpipinstall-rrequirements.txtOr you can simply runpipinstalldbseeker
Package: dbsession
dbsessionThe python postgreSQL ORMintroductionDBSession gives simplicity, flexibility and order to the abstraction of database tables into python objects. Right now it's only supporting postgreSQL with psycopg2UsageAssuming we have a table namedAwith the following estructureid | name  
----+-------
  1 | Paul  
  2 | GeorgeCreate an archiveA.pyand create a class for the database abstractionAthat inherits fromDatabaseObject. The attribute_TABLE_NAMEis the database table actual namefromDBSessionimportDatabaseObjectTABLE_NAME='A'class_A(DatabaseObject):_TABLE_NAME=TABLE_NAMEdef__init__(self,row):super().__init__(row)wrapper=_ANow implement every function associated with this table in the same file. Every function receives the params that goes in the query, and returns a tuple of four items:query (str): The actual queryvalues (Tuple): The params to be replaced into the querywrapper (Object): The class that represent the tablemany (bool): Whether the query will return one or many instancesdeffind_by_id(a_id):query=f"""SELECT *FROM{TABLE_NAME}WHERE id = %s"""values=(a_id,)returnquery,values,wrapper,Falsedefget_all():query=f"""SELECT *FROM{TABLE_NAME}"""values=()returnquery,values,wrapper,TrueCreate a connection to the database using theDBConnectionclass. It receives the pool instance from psycopg2.connection_pool=psycopg2.pool.ThreadedConnectionPool(MINIMUM_CONNECTION,MAXIMUM_CONNECTION,user=POSTGRES_USER,password=POSTGRES_PASSWORD,host=POSTGRES_HOST,port=POSTGRES_PORT,database=POSTGRES_DB)db_connection=DBConnection(connection_pool)Finally, in the main code. To execute the query just create aDBSessioninstance, and call theAmodule functions by using dequeryfunctionimportAdb_session=db_connection.get_session()a_1=db_session.query(A.find_by_id,1)print(a_1)# (1, 'Paul')all_a=db_session.query(A.get_all)print(all_a)# [(1, 'Paul'), (2, 'George')]
Package: dbsettings
django-dbsettingsdbsettings is a simple reusable Django app allowing you to store key-value
pairs in your database, so you can store configuation in your database easily.Quick startAdd "dbsettings" to your INSTALLED_APPS setting like this:INSTALLED_APPS=[...,'dbsettings',]Runpython manage.py makemigrations dbsettingsandpython manage.py migrate dbsettingsto create the models.Start the development server and visithttp://127.0.0.1:8000/admin/to add configuration values or use dbsettings.functions.setValue(key, value)
in your code.To retrieve a configuration value from the database, use
dbsettings.functions.getValue(key) in your code.Upgrade notesWhen upgrading to 0.9 from a previous version, your database tables will need
to be updated. To do this, just execute step 2 from the "Quick start" section
again.When upgrading to 0.9.5 or later from a previous version, you should first
uninstall the old version. To do that, run:pip uninstall django-dbsettings
pip install dbsettings
Package: dbsh
dbsh – an interactive shell for DB back-end.Every known DB has its own shell for SQL operations.
The dbshell (dbsh) provides unique, interactive, programmable environment
and simple shell to connect and manipulate your favorite DB contexts.
It supports naturally a syntax of DB you use to, for example, while you connect to
MySQL dbsh supports full syntax of MySQL, but when you connect to ORACLE it supports
ORALCE SQL and commands.It is based on two components:
- interactive python IPython,http://ipython.scipy.org/moin/About.
- SQLAlchemy,http://www.sqlalchemy.orgIt uses SQLAlchemy ORB tool as an SQL layer to perform interactive operations against given DB-backend.
Therefore it provides common shell for ANY DB back-end in uniform fashion.
All SQL operations supported by given DB back-end naturally supported by dbsh.