Skip to main content

Peasys Python Library

The Peasys Python library provides convenient tools for interacting with the Peasys service.

Documentation

See the Python API docs.

Installation

You don't need this source code unless you want to modify the package. If you just want to use the package, just run:

pip install --upgrade peasys

Requirements

  • Python 3.6+ (PyPy supported)

Usage

License key

Peasys is a tool used along a license that should be found on the dips400 website. This license key is required for the use of the service Peasys.

Connexion to the server

Peasys authenticates API requests using your license key, which you can find in the dashboard.

from peasys import pea_client

conn = pea_client.PeaClient("DNS_NAME", "PARTITION_NAME", PORT, "USERNAME", "PASSWORD", "ID_CLIENT", True, False)

Query the DB2

For example, use the ExecuteCreate method of the PeaClient class in order to create a a new table in the database.

create_response = conn.execute_create("CREATE TABLE schema_table/table_name (name CHAR(10), age INT)")
print(create_response.returnedSQLMessage)
print(create_response.returnedSQLState)

Deconnexion

It is important to always disconnect from the server after you used the connexion.

conn.disconnect()

Handling exceptions

Unsuccessful requests raise exceptions. The class of the exception will reflect the sort of error that occurred. Please see the documentation for a description of the error classes you should handle, and for information on how to inspect these errors.

Support

New features and bug fixes are released on the latest major version of the Peasys Python library. If you are on an older major version, we recommend that you upgrade to the latest in order to use the new features and bug fixes including those for security vulnerabilities. Older major versions of the package will continue to be available for use, but will not be receiving any updates.

Metadata

Release files for peasys 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for peasys 1.0.2
File Size Uploaded
peasys-1.0.2.tar.gz 10.5 kB Details

Release files / peasys-1.0.2.tar.gz

Download URL peasys-1.0.2.tar.gz
Size 10.5 kB
Tags Source
SHA-256 checksum
How to use checksums
dddc45a300437cbed0d1e5664e33dd9f6d037411342745058654c5e3f5850112
BLAKE2b-256 checksum
How to use checksums
981f290dad61060a27d14d3c54c73f26f049f5d398f8ca3c49e0b1e63a8cb9f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.1

Release history Release notifications | RSS feed

This release

1.0.2 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page