Saravanan666/pypi-org huggingface dataset:
Package: dbversions
dbversionsis a python software package which helps to keep distinct
database versions for various branches and commits of a git repository.The different versions are kept by database dumps at specific commits and
databases are brought up to the latest status by executing the db scripts
committed within a specific branch.Please find the documentation for the tool under:manualThe code is available on GitHub: Please feel free to take also a look onto it or
contribute if suitable:githubCopyright (c) 2016 - Christian Hofbauer
Package: dbviewer
dbviewerOverviewdbviewer is an Apprication for using SQLite database.Descriptiona database viewer using SQLite. Its Interface is based on wxWidget, and written in python 2.7.  It is designed to be simple and easy to use.RequirementsPython 2.7SQLite                (mostly not necessary to download, because included in Python)python-wxgtk2.8ChangelogVersion 0.2.1.0 (2015-04-21)Remodeled to store an image file into SQLite databaseFix some errorVersion 0.2.0.1 (2015-03-13)Add Rename-table and Alter-a-column by using sqlite’s “alter table”Fix some error
Package: dbwidgets
dbmodelCreates an object representation of given database. Aim is to generate data aware pyside2 widgets with master detail relationships defined automatically from database definitions.DBCombobox is implemented.DBTableWidget is partly implemented.Postgresql and SQLite  databases are implemented.Extracts column information, primary keys, and foreign keys if exists.db = DBSQLite("test.db")
db.extract()From that point, db has dictionary of tables, table names being the key value.
A table has a dictionary of columns, column names being the key value.If a foreign key is defined for any column, the referring table name is foreign_key_table, referring column name is foreign_key_column as attributes for column object.Schema of the test databaseCREATE TABLE city (
   id INTEGER NOT NULL, 
   name VARCHAR, 
   PRIMARY KEY (id)
);

CREATE TABLE district (
   id INTEGER NOT NULL, 
   name VARCHAR, 
   city_id INTEGER, 
   PRIMARY KEY (id), 
   FOREIGN KEY(city_id) REFERENCES city (id)
);Line By LineThe lines below are from  testapp.py MainWindowinitsection:First, create the database object by giving connection parameters.
For sqlite, file name is sufficient.self.db = DBSQLite("test.db")To create the table objects inside database object, call extract()self.db.extract()Place combobox widget for city table. Here, self.widget1 is the placeholder on ui definition.
self.db is the database, "city" is the name of the table, "name" is the column for displaying inside combobox. 34 is the optional  default value of the primary key for the combobox to display first.self.city = DBComboBox(self.widget1, self.db, "city", "name", "id", 34)Place the combobox for "district" table. Similar parameters as above.self.district = DBComboBox(self.widget2, self.db, "district", "name", "id")Now we will create a master detail connection between these two comboboxes.
We will call detail table's setMaster method. self.city is the widget to use as master,
"city_id" is the column name on the detail table, in our example, "district" table's "city_id" column.self.district.setMaster(self.city, "city_id")With three lines, we have two comboboxes connected with master-detail relationship.Below is the line for creating a DBTableWidget for "district" table.self.districtlist = DBTableWidget(self.widget3, self.db, "district")This line connects "district" dbtablewidget to city combobox:self.districtlist.setMaster(self.city, "city_id")This line will create a dbtablewidget for "city" table.self.citylist = DBTableWidget(self.widget4, self.db, "city")This line connects "district" dbtablewidget to "city" dbtablewidget:self.districtlist.setMaster(self.citylist, "city_id")Demo
Package: dbwrapper-python
dbwrapperNote: this library is pre-alpha.This version of dbwrapper is highly subject to change. Due to this, I won't be documenting a lot of the API. I tried to make the code fairly readable and code-suggestion friendly. I'm not planning on changing the structure of the major classes, but function arguments will definitely change and features will definitely be removed or addded.dbwrapper is a lightweight python library designed to simplify interacting with databases of all kinds. This is not an ORM, and I have no plans to make it one. dbwrapper allows programmers to easily create queries using a fluent API. The primary focus of this library is to make data persistance database-agnostic while keeping query overhead low.Supported DatabasesSQLitePostgreSQLDatabases with planned supportSQL ServerMySQLMongoDBFeaturesSELECT, UPDATE, INSERT, DELETE statementsTable Creation (via a Builder)MigrationsNote: Migrations are not automatically created, you have full control over these!List TablesList Table Columns'Type Safe' Table and Column retreivalOnly the presence of tables & columns is validated. Verifying the datatype would incur too much overhead.Aliasing for Tables and ColumnsSQL Functions (partially implemented)Connection PoolingBuilt in logging and query profiling (just enable it using logging.basicConfig)Simple Example Usagefromdbwrapperimportsqlite# or postgresql# If using PostgreSQL, the connection string will need to be changedconnection=sqlite.Connection("data.db")db=connection.database(sqlite.MASTER_DB)if"test"notindb.tables:withdb.table("test").builder()asbuilder:builder.column("id",db.dtypes.integer)builder.column("a",db.dtypes.varchar)builder.column("b",db.dtypes.float)builder.primary_key("id",autoincrement=True)test=db.tables.testtest.delete().execute()# delete everthingforiinrange(5):test.insert_one({test.columns.a:"hello world!",test.columns.b:i/5})# no parameters for select() = all columnsresults=test.select(test.columns.id,test.columns.a,test.columns.b)\.where(test.columns.b<=0.5)\.execute()print(results)connection.close()# optional, but good practice
Package: dbx
dbx by Databricks Labs🧱Databricks CLI eXtensions - akadbxis a CLI tool for development and advanced Databricks workflows management.Conceptdbxsimplifies Databricks workflows development, deployment and launch across multiple
environments. It also helps to package your project and deliver it to
your Databricks environment in a versioned fashion. Designed in a
CLI-first manner, it is built to be actively used both inside CI/CD
pipelines and as a part of local tooling for rapid prototyping.RequirementsPython Version > 3.8piporcondaInstallationwithpip:pip install dbxDocumentationPlease refer to thedocs page.Interface versioningFor CLI interfaces, we supportSemVerapproach.
However, for API components we don't use SemVer as of now. This may lead
to instability when usingdbxAPI methods directly.Legal InformationThis software is provided as-is and is not officially supported by
Databricks through customer technical support channels. Support,
questions, and feature requests can be communicated through the Issues
page of this repo. Please see the legal agreement and understand that
issues with the use of this code will not be answered or investigated by
Databricks Support.FeedbackIssues withdbx? Found a bug? Have a great idea for an addition? Feel
free to file anissue.ContributingPlease find more details about contributing todbxin the contributingdoc.
Package: dbxfs
dbxfsdbxfs is not licensed to be hosted on GitHub in response to GitHub's
history of exploitative behavior. If you are reading this on GitHub
this is an illegal mirror.  Do not use and report usage to the authorhttps://twitter.com/cejetvoledbxfs allows you to mount your Dropbox folder as if it were a local
filesystem. It differs from the official Dropbox client in two main
ways:Internet connectivity is required for accessNo disk space is required for access, but will cache if disk space is availabledbxfs has been tested on OpenBSD, Linux, macOS, and Windows but it should run on any
POSIX system that provides a FUSE-compatible library or has the
ability to mount SMB shares. It
runs on non-x86 architectures like ARM. It doesn't require a specific
file system.It is written for Python 3.11+ and is licensed under the GPLv3.Disclaimer: dbxfs is not affiliated with Dropbox, Inc.InstallationIf you are on Windows, the easiest way to use dbxfs is to download and
runthe pre-compiled
executable.
Read the README included with the Windows distribution for
Windows-specific instructions.If you are on Linux, you must install your OS's FUSE library. On
Debian/Ubuntu, install thelibfuse2package, on Fedora installfuse.Run the following command:$ pip3 install dbxfsOn Arch Linux and derivatives, you can find it in the AUR asdbxfs.UsageUsedbxfslike you would use themountcommand:$ dbxfs <mount_point>To unmount your Dropbox folder on Linux systems, you can usefusermount -u <mount_point>, on all other systems useumount.You can see the full list of command line options by passing-hto
thedbxfscommand.Advanced Refresh Token StorageBy default dbxfs stores your refresh token in an
encrypted file but you may want to store it in a GPG encrypted file
or something else. To do that you must first obtain a refresh token.
You can obtain a refresh token by running the following command:$ dbxfs --get-refresh-tokenOnce you have obtained the refresh token, encrypt it with the program of
your choice and store the result somewhere. After that, you must edit
the dbxfs config file. You can find the location of the config file by
running the following command:$ dbxfs --print-default-config-fileThe config file is a JSON encoded file. Add the following JSON key to
the top-level JSON object in that file:"refresh_token_command": ["gpg", "--decrypt", "/path/to/refresh/token/file.gpg"]Adapt it to a decryption program of your choice. This configuration
works great for storing the refresh token using a OpenPGP card.ContactRian Hunter@cejetvole
Package: dbxslackmessage
Package to send slack messages via databricks notebooks.UsageHere is a simple usage example:fromdbxslackmessageimportSlackMessagewebhook_url='https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX'channel='#your-channel'messages=['Hello, World!','This is a test message from dbxslackmessage package']slack_message=SlackMessage(webhook_url,channel)slack_message.send_messages(messages)Installing  dbxslackmessagepython -m pip install dbxslackmessage
Package: dbz-lib
dbz-libThe official library for working with the Databento Binary Encoding (DBZ) format.UsageThe primary point for entrypoint fordbz_libis theDbzobject, which
represents the contents of one DBZ file or byte stream.
To read a DBZ file with MBO data and print each row:usedb_def::tick::TickMsg;usedbz_lib::Dbz;letdbz=Dbz::from_file("20201228.mbo.dbz")?;fortickindbz.try_into_iter::<TickMsg>(){println!("{tick:?}");}The documentation provides an overview of all methods and features.DocumentationFIXME: when prepping to release to crates.ioBuildingdbzis written in Rust, so you'll need to haveRust installedfirst.To build, run the following commands:gitclonehttps://github.com/databento/dbzcddbz
cargobuild--releasePython bindingsTo also include the optional Python bindings when running anycargocommand,
pass the--all-featuresflag or--features=python.
For example, to build all of dbz with Python bindings, run:cargobuild--all-featuresTo create a Python package fromdbz-lib, you'll need to installMaturin.
For a Python package to develop against, run:maturin develop -F pythonThis will install a package nameddbz_libin your current Python environment.TestingTests are run throughcargo testand are located within each module.LicenseDistributed under theApache 2.0 License.
Package: dbz-python
dbz-pythonPython bindings for thedbz-libRust library.
Used by theDatabento Python client library.Using this crate is for advanced users and is not fully documented or supported.InstallationTo install the latest stable version from PyPI:pipinstall-Udbz-pythonUsageTo read the metadata from a DBZ file into adict, read the raw bytes and pass them todecode_metadata.fromdbz_pythonimportdecode_metadatawithopen("my.dbz","rb")asfin:metadata=decode_metadata(fin.read())# Print symbology mappingsprint(metadata["mappings"])You can write DBZ files usingwrite_dbz_file:fromdbz_pythonimportwrite_dbz_filerecords=[{"rtype":160,"publisher_id":1,"product_id":1,"ts_event":647784973705,"order_id":1,"price":3723000000000,"size":1,"flags":-128,"channel_id":0,"action":ord('C'),"side":ord('A'),"ts_recv":1609160400000704060,"ts_in_delta":0,"sequence":1170352}]withopen("my.dbz","wb")asout:write_dbz_file(file=out,schema="mbo",dataset="custom",records=records,stype="product_id")Note that the keys in the dictionaries inrecordsmust match the field names of the schema, or
the function will raise aKeyError.Buildingdbz-pythonis written in Rust, so you'll need to haveRust installedas well asMaturin.To build, run the following commands:gitclonehttps://github.com/databento/dbzcddbz
maturinbuildTo build the Python package and install it for the active Python interpreter in yourPATH, run:maturindevelopThis will install a package nameddbz_pythonin your current Python environment.LicenseDistributed under theApache 2.0 License.
Package: dc2dr
dc2drConvert Docker Compose to Docker Run CommandsFree software: MIT licenseDocumentation:https://dc2dr.readthedocs.io.FeaturesTakes a docker-compose file, gives back a list of docker run commands.The supported docker-compose keys are:depends_onlinksportsexposeenvironmentcommandimageUsage>From this dir you can run:` python ./dc2dr/cli.pytests/example-compose.yml`Or from in a python script:` from dc2dr import parser run_commands =parser.run_commands('path/to/compose.yml')`CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2016-08-02)First release on PyPI.
Package: dc3client
dc3clientWrapper for developing digitalcuring3 clients in pythonIf issues are found, please report them via GitHub issues.InstallationPython 3.10 or higher is requiredpipinstalldc3clientUsageseesample.pyCreate documentfromheresphinx-quickstartdocs# initsphinx-apidoc-f-o./docs/source/./
sphinx-build./docs/source/./docs/
Package: dc6006l
dc6006l - CLI/library to control FNIRSI DC Power Supply (DC-6006L, etc)What is this?FNIRSI DC6006Lis a programmable DC power supply
that is quite compact and inexpensive. This CLI tool/library allows you to control an unit
over an built-in USB-serial port.This work is based on the work byjchegerfor a similar model, DC-580. They seem to support same set of commands, but are not compatible
in message format.How to installpip install dc6006lHow to usedc6006l - Controls FNIRSI DC Power Supply (DC-6006L, etc)
Usage: dc6006l [-p devport] [-m model] cmd [cmd...]
Commands:
  on: Turn power on
  off: Turn power off
  v=<V>: Set target voltage
  c=<A>: Set target current
  ovp=<V>: Set over-voltage limit
  ocp=<A>: Set over-current limit
  opp=<W>: Set over-power limit
  ohp=<sec>: Set over-hour limit (0 to disable)
  noprotect: Disable protection
  stat: Show status (packed trace)
  trace=<n>: Show trace capture (infinite if n=-1)
  flush: Flush/clear log buffer
  echo=<str>: Print given input
  sep: Print separator string
  sleep=<sec>: Sleep for given seconds
  check: Enable double-check mode
Example:
  # Output 1V1A for ~3s
  $ dc6006l v=1 c=1 on sleep=3 off
  # More complex operation
  $ dc6006l check v=1.5 c=1.0 on flush sep trace=15 c=0.5 flush sep trace=15 off
NOTE:
  - Set envvar FNIRSI_PS=/some/devport to specify default port to use.NOTEWhile this code works for me, your milage may vary.Just as a head-up, in one case, target voltage was unexpectedly set to 15V
when I sent a command to set to 1.5V (V0150). Because there is no checksum in frame,
I suppose the unit dropped a byte and somehow interpreted as "V1500".
While the hardware is nice, it seems there is a serious issue with firmware
of the product that it easily drops data sent over a serial port.I added double-check mode (cmd: check) to cope with this, but this mode is
ineffective if you need to change the setting while the unit is already on.
Package: dcache
dcacheDistributed Cache for HumansDocumentation:https://dcache.readthedocs.io.InstallationpipinstalldcacheHow to UseTODOContributingContributions are welcome, feel free to open an Issue or Pull Request.Pull requests must be for thedevelopbranch.gitclonehttps://github.com/HBN3tw0rk/dcachecddcachegitcheckoutdeveloppython-mvenv.venvpipinstall-rrequirements_dev.txtpre-commitinstallpytestPitch (Portuguese)Part 1:https://www.loom.com/share/ee553d6915ca4dc5ba8609d48b59bd55Part 2:https://www.loom.com/share/50cb4ff9560943879d78864f5fa1b4e0What isdistributed cache for humanssimple API likelru_cachemultiple backendseasy to switch the backendgood documentationAPIdcachefromdcacheimportdcache@dcachedefslow_function(n):returnn**1000dcache vs redisimportredisredis=redis.Redis(host='localhost',port=6379,db=0)defslow_function(n):cached=redis.get(n)ifcached:returncachedvalue=n**1000redis.set(n,value)returnvaluedefslow_function2(n):cached=redis.get(n)ifcached:returncachedvalue=n**1000redis.set(n,value)returnvaluefromdcacheimportcachefromdcache.backendsimportRedisBackendcache=dcache(RedisBackend(host='localhost',port=6379,db=0))@cachedefslow_function(n):returnn**1000@cachedefslow_function2(n):returnn**1000real exampledefprocess(id,input):cache_path=get_content_cache_path(id,input)ifresource.file_exist(cache_path):returnresource.get_json(cache_path)response=slow_function(id,input)resource.put_json(body=response,file_path=cache_path)returnresponsefromdcacheimportdcachefromdcache.backendsimportS3Backend@dcache(S3Backend())defprocess(id,input):returnslow_function(id,input)Ideasintegration tests using containersmultiple backendsfromdcacheimportdcachefromdcache.backendsimportInMemoryBackend,RedisBackend@dcache(multiple=[InMemoryBackend(),RedisBackend(host='localhost',port=6379,db=0),])defslow_function(n):returnn**1000search on the in-memory cache;if exists, return, if not, search on Redis;if exists on Redis, save in memory and return;if not, exists on Redis, run theslow_function, save on Redis, save in-memory and return;doesn’t run if already returnedMVPin memoryRoadmapbackends: Redis, Memcached, Filesystem, database, S3, etc.multiple backendspluginsChangelog(unreleased)Add InMemory backend0.0.1 (2022-07-30)First release on PyPI.
Package: dcachefs
fair-software.nl recommendationsBadges1. Code repository2. License3. Community Registry4. Enable Citation5. ChecklistOther best practicesContinuous integrationDocumentationdCacheFSdCacheFS provides a file-system interface for adCache storage system, such as theinstance provided at SURF.
dCacheFS builds on theFilesystem Spec(fsspec) library and it can be used as an independent library or via the
more generalfsspecfunctions.InstallationTo install dcachefs, do:pip install dcachefsorgit clone https://github.com/NLeSC-GO-common-infrastructure/dcachefs.git
cd dcachefs
pip install .Run tests (including coverage) with:python setup.py testDocumentationThe project’s full documentation can be foundhere.ContributingIf you want to contribute to the development of dCacheFS,
have a look at thecontribution guidelines.LicenseCopyright (c) 2020, Netherlands eScience CenterLicensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.CreditsThis package was created withCookiecutterand theNLeSC/python-template.
Package: dcad-parser-hydrospanner
This repo provides tools for fast DB integration of data from the
Dallas Central Appraisal District (DCAD). This includesA CLI to generate SQLAlchemy models
by parsing a data dictionary andflask-sqlacodegen.A parser for DCAD’s table exports for parsing, coersion, and validation.Data Model CLIParse the Dallas Central Appraisal District (DCAD) data dictionary intosqlalchemymetadata. Use the generated metadata to generate
Flask-SQLAlchemy model code, usingflask-sqlacodegen.This will convert this data dictionary structure:TABLE [ABATEMENT_EXEMPT]                Table containing information for abatement if applicable
        [ACCOUNT_NUM]                   The DCAD Account number
        [APPRAISAL_YR]                  The appraisal year for the data
        [TOT_VAL]                       The total value for the propertyintofromflask_sqlalchemyimportSQLAlchemydb=SQLAlchemy()classAbatementExempt(db.Model):__tablename__='abatement_exempt'account_num=db.Column(db.Integer,primary_key=True,nullable=False,info='The DCAD Account number')appraisal_yr=db.Column(db.Integer,primary_key=True,nullable=False,info='The appraisal year for the data')tot_val=db.Column(db.Float,info='The total value for the property')Example (using the entery point)generate_sqlalchemypath/to/file.txt--outfilemodels.py--flaskTo see the full list of optionsgenerate_sqlalchemy--helpTable ParserThis parser functions as a dictionary parser for the invidual table exports.
It also coerces and validates the data.
It uses the same naming convention logic to identify field types as the Data Model process.Where to get it[PyPI](https://pypi.org/project/dcad-parser-hydrospanner/)pipinstalldcad-parser-hydrospanner
Package: dcapi
A Python wrapper for the commands available in the dcapi REST API.Usageimportdcapicharacter_by_name=dcapi.character('Ai Haibara')character_by_id=dcapi.character(1)If you are using a self-hosted version of the api, you can specify your own
endpoint and port.importdcapiapi=dcapi.set_url('127.0.0.1:8000')