Skip to main content

Brahm Centre internal utility functions

Project description

Brahm Centre Utils

Brahm Centre Utils is a collection of internal utility functions designed to facilitate common tasks at Brahm Centre. This package includes functions for Salesforce interactions, data processing, and more.

Installation

You can easily install Brahm Centre Utils using pip:

pip install brahm-centre-utils

It's recommended to install this package in a virtual environment.

Usage

After installing the package, you can use the functions provided by Brahm Centre Utils in your projects. Here are some examples:

Quick Import

You can import commonly used functions directly from the package:

from brahm_centre_utils import query_salesforce

Salesforce Integration

query_salesforce This function allows you to query Salesforce data using SOQL (Salesforce Object Query Language).

from brahm_centre_utils import query_salesforce
from simple_salesforce import Salesforce
from dotenv import load_dotenv

# Establish connection with SF with credentials from .env file
sf = Salesforce(
    username=os.getenv('SF_USERNAME'),
    password=os.getenv('SF_PASSWORD'),
    security_token=os.getenv('SF_SECURITY_TOKEN'),
    domain=os.getenv('SF_DOMAIN')
)

# Use the function to query SF
result = query_salesforce("SELECT Id, Name FROM Account")
print(result)

Full List of Functions

  • brahm_centre_utils.query_salesforce
  • brahm_centre_utils.salesforce.get_Id_from_SF_URL
  • brahm_centre_utils.salesforce.send_coa_certificates
  • brahm_centre_utils.common.normalize_name
  • brahm_centre_utils.common.are_names_similar
  • brahm_centre_utils.common.get_unique_names

Configuration

Brahm Centre Utils requires certain environment variables for Salesforce integration. These should be stored in a .env file in the root of your project.

Exmple .env file

SF_USERNAME=your_salesforce_username
SF_PASSWORD=your_salesforce_password
SF_TOKEN=your_salesforce_security_token
SF_DOMAIN=your_salesforce_domain

Upload a New Version

  1. Update the version number in setup.py.
  2. Rebuild the distribution files:
python setup.py sdist bdist_wheel
  1. Upload to PyPI
twine upload dist/*

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

brahm_centre_utils-1.0.5.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

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

brahm_centre_utils-1.0.5-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file brahm_centre_utils-1.0.5.tar.gz.

File metadata

  • Download URL: brahm_centre_utils-1.0.5.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for brahm_centre_utils-1.0.5.tar.gz
Algorithm Hash digest
SHA256 f9a6ac07233471b8b1e76623a4e43e266e22759a4857b55df1bc9ad847729555
MD5 bb645973fe1d47cd966c54ae0e26314f
BLAKE2b-256 79378578741256659aa9ada6b34425a4e744d6b0dcbeffa2a2f543de23ea8dcb

See more details on using hashes here.

File details

Details for the file brahm_centre_utils-1.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for brahm_centre_utils-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 9b8fca985b8952479e49b9f160bd21f6ab0e0f6283e80568e5ec7f0bc46bbede
MD5 edf62bfc0f95bcb2700b6307f9cd90af
BLAKE2b-256 7e9974c1db301a66d298fb8ae2710af0c79dc9adbf9f8f1b0114726b74913150

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