Skip to main content

A utility to determine the type of permit based on ID

Project description

Insafe Connect to Database

Build library command

python setup.py sdist bdist_wheel

Upload library command

twine upload dist/*

Install specific version

pip install insafeConnectToDatabase==0.2.2

Environment setup

To activate cloud sql proxy, add SERVICE_ACCOUNT_KEY environment variable with base64 encoded credentials:

cat service-account-key.json | base64 | pbcopy

Database Connection issue

while trying to connect to a database, we faced multiple issues as they're following

  • connect to a staging database with proxy
    • we should use the library which is going to install the proxy script and read a service account from env
  • have conflict with prot number 4532, which is shared between postgres we have in the cloud and the one we have in local docker
    • we have to change one of the port numbers

Note: We have to make sure that we have latest cloud sql proxy in the project https://github.com/GoogleCloudPlatform/cloud-sql-proxy

  • Make sure we have the following in the setup to add library assets
    package_data = {
  'insafeConnectToDatabase': ['cloud-sql-proxy', 'cloud-sql-proxy-linux'],  # Include the script
}

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

insafeConnectToDatabase-0.6.2.tar.gz (29.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

insafeConnectToDatabase-0.6.2-py3-none-any.whl (29.2 MB view details)

Uploaded Python 3

File details

Details for the file insafeConnectToDatabase-0.6.2.tar.gz.

File metadata

  • Download URL: insafeConnectToDatabase-0.6.2.tar.gz
  • Upload date:
  • Size: 29.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.13

File hashes

Hashes for insafeConnectToDatabase-0.6.2.tar.gz
Algorithm Hash digest
SHA256 d02bffd85cde6fb423a737b0b4c39d7c3b2dcbaa6537468ddc0f2d0a9d8ca24d
MD5 27266721a08bdaa132164b5683e70ddf
BLAKE2b-256 17575603efd3e136aabcd03ec8d7c70087065e6de6f76690723dfbe9ba694a98

See more details on using hashes here.

File details

Details for the file insafeConnectToDatabase-0.6.2-py3-none-any.whl.

File metadata

File hashes

Hashes for insafeConnectToDatabase-0.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a1e2dc98b8c9c3c2c9c93939bf7c2400789b80298eaeebfce4086121b71cd11c
MD5 860e9e2c8bee8e6d6ef04c506e9528aa
BLAKE2b-256 20b3684f5808700cb1f4be5ee25f178dab351e1a3de8e12326f1817d736d9ed0

See more details on using hashes here.

Supported by

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