Skip to main content

Universal naming system and varaible stroage for better collaboration

Project description

Documentation

user_profile

Provides the framework for storing a unique profile for individuals and Python environments. Each user profile has a unique set of attributes and methods, much like a Python class instance.

Project Description

When importing your profile from a unique location on your computer, you have access to unique attributes and methods to this profile. This allows us to call

user_profile.profile.name
user_profile.profile.say_hi()

How does it work?

Let's take the following code block:

import user_profile
profile = user_profile.profile

The first two lines of code import the user's unique profile. It is stored on the user's local laptop, SageMaker instance, or wherever else their code is stored. It utilizes the "USER" environment variable on your machine. Specifically, it is found at the path ./user_profile/Users/"USER".py. This Python script is imported as a module and stored in the variable "profile"

print (profile.first_name)
print (profile.last_name)
user_profile.say_hi()

These next lines access attributes and methods of the imported Python Class, profile. The first two lines print off the attributes first_name and last_name stored in the given user's profile module. The last line runs a module method say_hi().

These attributes and methods can be different for every single user. This opens the door for several cool applications from a team development perspective.

Why does this exist?

This repository allows for multiple users to run the same code while achieving different results.

Imagine you need to access a Database using an encrypted password.

encryped_password = 'ASDF1234'
database.access( encryped_password )

Each person that runs this Python script has a different value for their unique encrypted password. Not everyone's password is going to be ASDF1234. Instead of typing out one password that will only work for you, utilize the following:

# My Profile

first_name = 'James'
last_name = 'Kabbes'
encryped_password_path = 'C:/Users/e150445/Documents/Passwords/encrypted_password.txt'
# My Co-worker's Profile

first_name = 'Michael'
last_name = 'Scott'
encryped_password_path = 'C:/Users/e94586/Documents/Passwords/mikes_password.txt'
encrypted_password = read_text_file( profile.encryped_password_path )
database.access( encrypted_password )

This block instead reads information from a text file stored in a path on your computer. Each user running this script will have a different value for encrypted_password_path. Using the user profile to store your unique encrypted_password_path allows each team member to run this same block of code without any issues.

Author(s)

James Kabbes - Data Scientist: Ameren Innovation Center

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

kabbes_user_profile-0.2.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

kabbes_user_profile-0.2.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file kabbes_user_profile-0.2.0.tar.gz.

File metadata

  • Download URL: kabbes_user_profile-0.2.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.63.1 importlib-metadata/4.8.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7

File hashes

Hashes for kabbes_user_profile-0.2.0.tar.gz
Algorithm Hash digest
SHA256 02cf4adfb878872218d37a6912d2881e9bcabe02bbdae4082e0b25ed90741f7c
MD5 7983c4c1b7ca6bedef6be6bb48978ed0
BLAKE2b-256 7d877257e4399d1257e6685c98744c4c6937498fc68ab9c74ae14ca9b73105bd

See more details on using hashes here.

File details

Details for the file kabbes_user_profile-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: kabbes_user_profile-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.63.1 importlib-metadata/4.8.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7

File hashes

Hashes for kabbes_user_profile-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9a1557b69ec3045c72f8ebee43e897bddae5b1073a5e817e958f3036bd19fc29
MD5 e124844e8195f4375e9f93e2a56fe9ed
BLAKE2b-256 65520464c36e24c0c380e89aa95e003e5169721e29d236deb9c780e596ea7e89

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