Skip to main content

No project description provided

Project description

profpy

What is profpy?

The profpy library is a centralized repository for Rowan's various python scripts to use.

Why use it?

Many of Rowan's python scripts/programs utilize similar or congruent functions and classes that end up getting rewritten or even copy/pasted wherever needed. Rather than continue this trend of untracked code, profpy allows us to have overhead control over these common functions and classes. If a program or script needs to use a class or function, it can just import it from profpy rather than rewrite it. This will allow us to standardize some of our code practices moving forward.

Installation

pip3 install profpy

Submodules

The profpy library is organized into submodules. For instance, database-related functionality can be access by importing the "db" submodule. For example, to import the function that parses together a cx_Oracle connection object one could do this:

from profpy.db import get_connection

if __name__ == "__main__":
    connection = get_connection("full_login", "db_password")
    cursor = connection.cursor()
    # do stuff

or

from profpy.db import with_oracle_connection

@with_oracle_connection()
def main(connection):
    cursor = connection.cursor()
    # do stuff

if __name__ == "__main__":
    main()

Note: "full_login" and "db_password" are the defaults for both methods

Dependencies

  • Python 3.6.7 or above
  • Oracle Instant Client

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

profpy-1.2.6.tar.gz (39.3 kB view hashes)

Uploaded Source

Built Distribution

profpy-1.2.6-py3-none-any.whl (42.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page