Saravanan666/pypi-org huggingface dataset:
Package: psychosnd
version number: 0.0.7 author: Gavin CooperOverviewPsychopy sound analysis scripts.It contains one module that is a thin wrapper on the csv module to open
aPsychopycsv data file and provide an
interface similar to theprespylibrary.The other module relies heavily on the sound card latency analyser
functionality of the sameprespylibrary in order to provide a
similar interface as a command line script.Installation / UsageTo install use pip:$ pip install psychosndIf you have a local version you can also use:$ pip install <path_to_package>/psychosnd-0.0.7.tar.gzTo use the command line script, once installed you can runpsych-scla<soundfile> <logfile>to analyse the difference in sound
presentation times as recorded in each file.For the full procedure see the write up in theprespydocumentationhere.For more information on the options you can pass to the scla command you
can type inpsych-scla--helpfor the full list.ContributingTBDExampleTBD
Package: psychsim
PsychSimDecision-theoretic agents with Theory of Mind for social simulation.DocumentationThe latests documentation can be foundhere.Installation/DevelopmentIn order to install the module for development (see pipdocs):clone the repository:git clone https://github.com/usc-psychsim/psychsim.gitcdinto the repository directory and use:pip install -e .remove later if desired using:pip uninstall psychsimUsing the-eargument will allow you to actively work on the package locally without needing to re-install every time you make a modification to the source. In order to install "permanently" simply omit the-ein step 2 above.To install from arequrements.txt(i.e. as part of an automated docker build)use:-e git+https://github.com/usc-psychsim/psychsim.git#egg=psychsim
Package: psyco
Psyco is a historical project and only works on Python <= 2.6 on 32-bit x86 Intel CPUs.  See also PyPy.Psyco shows that it is possible to execute Python code at speeds
approaching that of fully compiled languages, by “specialization”.
This extension module for the unmodified interpreter accelerates
user programs with little or not change in their sources, by a
factor that can be very interesting (2-10 times is common).
Package: psycodanticpg
psycodanticpgpsycopg2 database utilizing pydantic modelsscripts:psycodanticpg may be invoked as an executable file. see 'scripts' directory for all possible scripts to run using the cli.

examples:
    to generate the pydantic schemas from an existing database, invoke the 'generate_schemas' script like this:
        python3 -m psycodanticpg generate_schemas --dsn=postgres://postgres:password@localhost:5432/mydatabase --output_path=test_generate_schema_source.py
Package: psycog
Psychophysics and Cognition (psycog)This software is for measuring psychophysical and cognitive abilities in humans. I use it
for my own research, but it is open source and freely available for anyone to use.InstallationPython Packagepsycogis a Python package. You can install it usingpip:pipinstallpsycogDue to the large number of dependencies, it is strongly recommended that you installpsycogin a freshvirtual environment.Standalone ExecutableI intend to makepsycogavailable as a standalone executable in the future. This will
allow you to run experiments without having to install Python or any dependencies, though
the executable will be quite large (~1GB). This is not yet available.UsageCommand Linepsycogis GUI-based. To run it, simply typepsycoginto the command line. This will
open the main menu, from which you can select the experiments you wish to run.PythonYou can also run the GUI from inside a Python REPL or script, though I'm not sure why you
would want to do this.frompsycogimportrunrun()
Package: psycogreen
Thepsycogreenpackage enables psycopg2 to work with coroutine libraries,
using asynchronous calls internally but offering a blocking interface so that
regular code can run unmodified.Psycopgofferscoroutines supportsince release 2.2. Because the main
module is a C extension it cannot be monkey-patched to become
coroutine-friendly. Instead it exposesa hookthat coroutine libraries can
use to install a function integrating with their event scheduler. Psycopg will
call the function whenever it executes a libpq call that may block.psycogreenis a collection of “wait callbacks” useful to integrate Psycopg
with different coroutine libraries.Installationpip install psycogreenModulepsycogreen.eventletEventletcurrently supports Psycopg out-of-the-box andpsycogreenis not
necessary. Seethe documentationfor patching instruction.If for any reason you want to avoid using Eventlet monkeypatching you can usepsycogreen.eventlet.patch_psycopg().Functionpsycogreen.eventlet.patch_psycopg()Enable async processing in Psycopg integrated with the Eventlet events
loop.  It is performed by registeringeventlet_wait_callback()as
psycopg2 wait callback.Functionpsycogreen.eventlet.eventlet_wait_callback(conn)A wait callback integrating with Eventlet events loop.An example script showing concurrent usage ofpsycopg2withurlopen()with Eventlet is available intests/test_eventlet.py.Modulepsycogreen.geventIn order to use psycopg2 asynchronously withgeventyou can usepsycogreen.gevent.patch_psycopg().Functionpsycogreen.gevent.patch_psycopg()Enable async processing in Psycopg integrated with the gevent events
loop.  It is performed by registeringgevent_wait_callback()as
psycopg2 wait callback.Functionpsycogreen.gevent.gevent_wait_callback(conn)A wait callback integrating with gevent events loop.An example script showing concurrent usage ofpsycopg2withurlopen()with gevent is available intests/test_gevent.py.uWSGI green threadsRoberto De Ioris is writinguGreen, a green thread implementation on top of
theuWSGI async platform.He has performed some tests using bothpsycopg2 async supportandpsycopg2 green supportand has reported no problem in their stress tests
with both the async styles.
Package: psycopg
Psycopg 3 is a modern implementation of a PostgreSQL adapter for Python.This distribution contains the pure Python packagepsycopg.NoteDespite the lack of number in the package name, this package is the
successor ofpsycopg2.Please use the psycopg2 package if you are maintaining an existing program
using psycopg2 as a dependency. If you are developing something new,
Psycopg 3 is the most current implementation of the adapter.InstallationIn short, run the following:pip install --upgrade pip           # to upgrade pip
pip install "psycopg[binary,pool]"  # to install package and dependenciesIf something goes wrong, and for more information about installation, please
check out theInstallation documentation.HackingFor development information check outthe project readme.Copyright (C) 2020 The Psycopg Team
Package: psycopg2
Psycopg is the most popular PostgreSQL database adapter for the Python
programming language.  Its main features are the complete implementation of
the Python DB API 2.0 specification and the thread safety (several threads can
share the same connection).  It was designed for heavily multi-threaded
applications that create and destroy lots of cursors and make a large number
of concurrent “INSERT”s or “UPDATE”s.Psycopg 2 is mostly implemented in C as a libpq wrapper, resulting in being
both efficient and secure.  It features client-side and server-side cursors,
asynchronous communication and notifications, “COPY TO/COPY FROM” support.
Many Python types are supported out-of-the-box and adapted to matching
PostgreSQL data types; adaptation can be extended and customized thanks to a
flexible objects adaptation system.Psycopg 2 is both Unicode and Python 3 friendly.DocumentationDocumentation is included in thedocdirectory and isavailable online.For any other resource (source code repository, bug tracker, mailing list)
please check theproject homepage.InstallationBuilding Psycopg requires a few prerequisites (a C compiler, some development
packages): please check theinstalland thefaqdocuments in thedocdir
or online for the details.If prerequisites are met, you can install psycopg like any other Python
package, usingpipto download it fromPyPI:$ pip install psycopg2or usingsetup.pyif you have downloaded the source package locally:$ python setup.py build
$ sudo python setup.py installYou can also obtain a stand-alone package, not requiring a compiler or
external libraries, by installing thepsycopg2-binarypackage from PyPI:$ pip install psycopg2-binaryThe binary package is a practical choice for development and testing but in
production it is advised to use the package built from sources.Linux/OSX:Windows:
Package: psycopg2-binary
Psycopg is the most popular PostgreSQL database adapter for the Python
programming language.  Its main features are the complete implementation of
the Python DB API 2.0 specification and the thread safety (several threads can
share the same connection).  It was designed for heavily multi-threaded
applications that create and destroy lots of cursors and make a large number
of concurrent “INSERT”s or “UPDATE”s.Psycopg 2 is mostly implemented in C as a libpq wrapper, resulting in being
both efficient and secure.  It features client-side and server-side cursors,
asynchronous communication and notifications, “COPY TO/COPY FROM” support.
Many Python types are supported out-of-the-box and adapted to matching
PostgreSQL data types; adaptation can be extended and customized thanks to a
flexible objects adaptation system.Psycopg 2 is both Unicode and Python 3 friendly.DocumentationDocumentation is included in thedocdirectory and isavailable online.For any other resource (source code repository, bug tracker, mailing list)
please check theproject homepage.InstallationBuilding Psycopg requires a few prerequisites (a C compiler, some development
packages): please check theinstalland thefaqdocuments in thedocdir
or online for the details.If prerequisites are met, you can install psycopg like any other Python
package, usingpipto download it fromPyPI:$ pip install psycopg2or usingsetup.pyif you have downloaded the source package locally:$ python setup.py build
$ sudo python setup.py installYou can also obtain a stand-alone package, not requiring a compiler or
external libraries, by installing thepsycopg2-binarypackage from PyPI:$ pip install psycopg2-binaryThe binary package is a practical choice for development and testing but in
production it is advised to use the package built from sources.Linux/OSX:Windows:
Package: psycopg2-contextmanager
InstallationRunpip installpsycopg2-contextmanagerUsagefrom psycopg2_contextmanager import database_connection

with database_connection(<database_connection_string>) as cursor:
    cursor.execute(<query>)Commits are handled automatically. If the query fails, the package will log the exception along with the lineUnable to run queryand re-raise it.
Package: psycopg2Crate
Psycopg is the most popular PostgreSQL database adapter for the Python
programming language.  Its main features are the complete implementation of
the Python DB API 2.0 specification and the thread safety (several threads can
share the same connection).  It was designed for heavily multi-threaded
applications that create and destroy lots of cursors and make a large number
of concurrent “INSERT”s or “UPDATE”s.Psycopg 2 is mostly implemented in C as a libpq wrapper, resulting in being
both efficient and secure.  It features client-side and server-side cursors,
asynchronous communication and notifications, “COPY TO/COPY FROM” support.
Many Python types are supported out-of-the-box and adapted to matching
PostgreSQL data types; adaptation can be extended and customized thanks to a
flexible objects adaptation system.Psycopg 2 is both Unicode and Python 3 friendly.DocumentationDocumentation is included in thedocdirectory and isavailable online.For any other resource (source code repository, bug tracker, mailing list)
please check theproject homepage.InstallationBuilding Psycopg requires a few prerequisites (a C compiler, some development
packages): please check theinstalland thefaqdocuments in thedocdir
or online for the details.If prerequisites are met, you can install psycopg like any other Python
package, usingpipto download it fromPyPI:$ pip install psycopg2or usingsetup.pyif you have downloaded the source package locally:$ python setup.py build
$ sudo python setup.py installYou can also obtain a stand-alone package, not requiring a compiler or
external libraries, by installing thepsycopg2-binarypackage from PyPI:$ pip install psycopg2-binaryThe binary package is a practical choice for development and testing but in
production it is advised to use the package built from sources.Linux/OSX:Windows:
Package: psycopg2ct
An implementation of the psycopg2 module using ctypes.
The module is currently compatible with Psycopg 2.4.4.To use this package with Django or SQLAlchemy create a psycopg2.py file
somewhere in your python path (e.g. the current working dir) and add:from psycopg2ct import compat
compat.register()This will map psycopg2ct to psycopg2.This module is only tested with python 2.6+ and PyPy 1.6+This is a port of Alex Gaynor’s rpython port
(https://bitbucket.org/alex_gaynor/pypy-postgresql/overview) of psycopg2 to
python + ctypes.
Package: psycopg2-iam
psycopg2-iamCustom Connection Factory class (RDS, Redshift) with build-in IAM authentication and SSL bundle downloader support.InstallationInstall packagepoetry add psycopg2-iamUsageCreate connection directly from secretfrompsycopg2_iamimportconnectconn=connect(secret="secretId")Using connect functionfrompsycopg2_iamimportconnectconnect(dsn="...")Pass connection factory class to psycopg2.connect()importpsycopg2frompsycopg2_iamimportIAMConnectionpsycopg2.connect(dsn="...",connection_factory=IAMConnection)Create DSN from AWS generated RDS secretimportboto3importjsonimportpsycopg2frompsycopg2_iamimportIAMConnection,dsn_from_rds_secretsecrets=boto3.client("secretsmanager")db_secret=json.loads(secrets.get_secret_value(SecretId="/dynks/rds/readonly").get("SecretString"))psycopg2.connect(dsn=dsn_from_rds_secret(db_secret),connection_factory=IAMConnection)
Package: psycopg2-logical-decoding-json-consumer
PsycoPG2-Logical-Decoding-JSON-Consumerpsycopg2-logical-decoding-json-consumer is an asynchronous library that consumes
PostgreSQL logical replication created by the logical-decoding-json output
plugin.The library supports fast filtering of events and allows individual transactions
to be acknowledged out of order.Transactions can be read one-by-one with read_transaction(), or collected in
batches (simplifying de-duplication) with read_transaction_batch()
Package: psycopg2-managed-connection
This package includes a managed connection forpsycopg2that provides
thread-safe exclusive access to an underlyingpsycopg2.connectionobject.This allows many threads to share the same connection instance (avoiding the
TCP and process startup cost associated with establishing a new PostgreSQL
connection) and ensures that threads do not release the connection with a
transaction still in progress – either due to developer error, or an unhandled
exception while a thread is interacting with the database.ManagedConnectionalso will ensure that a connection that is closed upon
entering the managed context will be opened.UsageCreating a Managed Connection>>>frompgmanagedconnectionimportManagedConnection>>>>>>dsn='postgres:///postgres'# a libpq connection string>>>manager=ManagedConnection(dsn)>>>manager<ManagedConnection:postgres:///postgres(closed)>Making Queries>>>withmanager()asconnection:...cursor=connection.cursor()...cursor.execute('SELECT 1')...cursor.fetchone()...connection.commit()(1,)Dealing with Uncommitted TransactionsLeaving a transaction open when exiting the context manager will lead to aRuntimeError. This also results in any open transactions implicitly being
rolled back.>>>withmanager()asconnection:...cursor=connection.cursor()...cursor.execute('SELECT 1')Traceback(mostrecentcalllast):...RuntimeError:Didnotcommitorrollbackopentransactionbeforereleasingconnection.Dealing with ErrorsThe currently open transaction will be rolled back if an unhandled exception is
encountered.>>>importpsycopg2>>>withmanager()asconnection:...cursor=connection.cursor()...cursor.execute('SELECT 1')...assertmanager.statusispsycopg2.extensions.TRANSACTION_STATUS_INTRANS...raiseNotImplementedError()Traceback(mostrecentcalllast):...NotImplementedError>>>manager.statusispsycopg2.extensions.TRANSACTION_STATUS_IDLETrueDevelopmentTestingThe test suite can be run withmake test.It assumes a running and accessible PostgreSQL server. The connection details
are deferred to the underlyinglibpqimplementation, and default values can
be specified usinglibpq environment variables.toxis also supported as a test runner (if installed.)Testing with Docker$exportPGPORT=5432$dockerrun-dp$PGPORT:5432postgres$PGUSER=postgresmaketestIf usingboot2docker, thePGHOSTenvironment variable will also need to be
set to the virtual machine IP address.$PGUSER=postgresPGHOST=$(boot2dockerip)maketest
Package: psycopg2-pgevents
This package makes it simple to use PostGreSQL’s NOTIFY/LISTEN eventing system
from Python in a consistent, pleasing manner.Note that this project officially supports Python 3.6+. This is primarily due
to static typing.ExampleThe following shows an example of the package in action.AssumptionsPostGreSQL server is running locally.default database (postgres) is available.table exists in database in the public schema with the nameorders.frompsycopg2importconnectfrompsycopg2_pgevents.triggerimportinstall_trigger,\install_trigger_function,uninstall_trigger,uninstall_trigger_functionfrompsycopg2_pgevents.eventimportpoll,register_event_channel,\unregister_event_channelconnection=connect(dsn='postgres:///postgres')connection.autocommit=Trueinstall_trigger_function(connection)install_trigger(connection,'orders')register_event_channel(connection)try:print('Listening for events...')whileTrue:forevtinpoll(connection):print('New Event:{}'.format(evt))exceptKeyboardInterrupt:print('User exit via Ctrl-C; Shutting down...')unregister_event_channel(connection)uninstall_trigger(connection,'orders')uninstall_trigger_function(connection)print('Shutdown complete.')TroubleshootingThe connection’sautocommitproperty must be enabled for this package to
operate correctly. This requirement is provided by PostGreSQL’s NOTIFY/LISTEN
mechanism.The same connection that is used withregister_event_channel()must be
used withpoll()in order to receive events. This is due to the nature of
how PostGreSQL manages “listening” connections.If the table that you’d like to listen to is not in the public schema, the
schema name must be given as a keyword argument in theinstall_trigger()method.Authorship and LicenseWritten by Shawn Wallis and distributed under the MIT license.
Package: psycopg2-pool
See the documentation athttps://psycopg2-pool.readthedocs.io/.Changelog1.2 (January 15, 2024)Drop support for Python 2.7Callpsycopg2.connectinstead ofpsycopg2._connect, for compatibility with tools like AWS XRay.1.1 (October 8, 2019)Fixes the discarding of extraneous connectionsFixesThreadSafeConnectionPool.__slots__1.0 (October 6, 2019)Initial release.
Package: psycopg2transaction
psycopg2 integration with transactionThis package provides two-phase commit integration between psycopg2
and the transaction package.Sample usage:>>> import psycopg2, psycopg2transaction, transaction

>>> conn = psycopg2.connect(mydsn)
>>> trans = transaction.get()
>>> psycopg2transaction.join(conn, trans)

>>> ... do things with the psycopg2 connection

>>> transaction.commit()This is just an example. The connection might come from a pool or
otherwise already exist, as long as it is in asuitable state to start
a distributed transaction.Similarly, the transaction may come from the thread-local transaction
manager, as shown above, or from an application-managed transaction
manager.The critical line in the example above is:>>> psycopg2transaction.join(conn, trans)The work done in the connection is committed by calling the
transaction’s commit method, typically by callingcommiton the
transaction’s manager, as shown above.If you use a thread-local transaction manager (as in the example
above), you can omit the transaction argumet tojoin:>>> psycopg2transaction.join(conn)Connection managementLimited connection management is provided:>>> dsn = 'dbname=test'
>>> conn = psycopg2transaction.join(dsn)
...
>>> conn = psycopg2transaction.join(dsn)
...
>>> transaction.commit()If you pass a connection string rather than a connection tojoin, a
connection will be opened for you and closed when the transaction is
committed.  Ifjoinis called multiple times with the same connection
string, then the same connection is used and returned.Using Postgres notifyYou can’t use two-phase commit in postgres transactions in which
you’ve used NOTIFY (or LISTEN or UNLISTEN).  You can cause NOTIFY to
be used after a transaction has committed, but before a managed
connection has been closed by passing anotifyargument to join
with a name of a notification or a sequence of string notification
named.  The strings may be simple names, or names followed by a comma
and string data, as would follow NOTIFY in a notify expression:>>> conn = psycopg2transaction.join(dsn, notify='myjobs')Changes0.1.1 (2017-03-18)Package meta data.0.1.0 (2017-03-18)Initial release
Package: psycopg2-utility-functions
Psycopg2 Utility Functions"Psycopg2 Utility Functions" is a Python package that provides utility functions for basic PostgreSQL database operations using the psycopg2 library.InstallationYou can install this package using pip:pipinstallpsycopg2_utility_functionsUsageConnecting to the DatabaseTo establish a connection to a PostgreSQL database:from psycopg2_utility_functions import connect_to_database

connection = connect_to_database(database='your_db_name', user='your_db_user', password='your_db_password', host='your_db_host', port='your_db_port')Executing QueriesTo execute a SQL query on the connected database:from psycopg2_utility_functions import execute_query

query = "CREATE TABLE users (id serial PRIMARY KEY, name varchar, age int);"
execute_query(connection, query)Fetching DataTo fetch data from the database and create objects using a custom class:from psycopg2_utility_functions import fetch_data

class User:
    def __init__(self, name, age):
        self.name = name
        self.age = age

query = "SELECT name, age FROM users WHERE age > %s;"
users = fetch_data(connection, query, User, values=(25,))Inserting DataTo insert a single row of data into a table:from psycopg2_utility_functions import insert_data

data = {'name': 'Alice', 'age': 30}
insert_data(connection, 'users', data)Updating DataTo update rows in a table based on a condition:from psycopg2_utility_functions import update_data

condition = "age > %s"
data = {'age': 31}
update_data(connection, 'users', condition, data)Deleting DataTo delete rows from a table based on a condition:from psycopg2_utility_functions import delete_data

condition = "age < %s"
delete_data(connection, 'users', condition)ContributingFeel free to contribute to this project by opening issues or pull requests on the GitHub repository.LicenseThis project is licensed under the MIT License.