Skip to main content

The package objective is to mischaracterize sensitive data from this through blinding masks using asterisk

Project description

STARRO

Starro

Starro is a facilitator to overshadow sensitive information.

It reduces the brain overload inherent in the Regex complexity, bringing several commands closer to human language.

how to install?

Pip:

    pip install starro

Poetry:

    poetry add starro

how it works?

Basic usage

from starro import starro

password = "MyP@ssW0r$"
print(starro.password(password))
#prints:    **********

token =  "3hjsdf67kajh8990s5dff0lk5sdfsfhjks8923"
print(starro.secret(token))
#prints:  **************************************

fullname = "Marcos Monteiro Borges"
print(starro.name(fullname))
#prints:    M***** M******* B*****

mail =   "contato@marcosborges.com "
print(starro.mail(mail))
#prints:  c******@marcosborges.com

phone =  "+55 (11) 9999-9999"
print(starro.phone(phone)) 
#prints: "+** (**) ****-9999"

creditcard = "6666-0000-8888-3232"
print(starro.creditcard(creditcard))
#prints: "6666-****-****-3232"

cpf =    "313.789.874-45"
print(starro.cpf(cpf))
#prints: "313.***.***-45"

rg =     "34.275.057-4"
print(starro.rg(rg))
#prints: "34.***.***-4"

# Others examples
assert starro.complete("1234567890") == "**********"
assert starro.mask_left("Testing mask left", 3) == "***ting mask left"
assert starro.mask_right("Testing mask right", 3) == "Testing mask ri***"
assert starro.fix_left("Testing fix left", 3) == "Tes*************"
assert starro.fix_right("Testing fix right", 3) == "**************ght"
assert starro.mask_center('completeds', 5) == 'com*****eds'
assert starro.mask_center('completeds', 12) == '**********'
assert starro.fix_center('complete', 4) == '**mple**'
assert starro.fix_center('complete', 12) == '********'

Decorator usage

from starro.starro import starrofy

class MyClass:

    @property
    @starrofy('name')
    def fullname(self):
        return self._fullname


    @property
    @starrofy('phone')
    def phone(self):
        return self._phone

    
    @property
    @starrofy('email')
    def mail(self):
        return self._email

    
    @property
    @starrofy('password')
    def password(self):
        return self._password



myClass = MyClass()

myClass.fullname = "Full Name User"
myClass.phone = "+55 11 99999-9999"
myClass.cpf = "313.313.313-32"
myClass.mail = "contato@marcosborges.com"
myClass.creditcard = "2080-1408-0210-3005"


print("fullname:" + myClass.fullname + "\n")
print("phone:" + myClass.phone + "\n")
print("cpf:" + myClass.cpf + "\n")
print("mail:" + myClass.mail + "\n")
print("creditcard:"  + myClass.creditcard + "\n")

What are the dependencies?

  • Core
    • python = "^3.6"
      • re
      • math
  • Develop
    • pytest = "^6.2.2"
    • coverage = "^5.5"
    • pylint = "^2.7.2"
    • bandit = "^1.7.0"
    • flake8 = "^3.9.0"
    • dependency-check = "^0.5.0"


QualityGate

SonarCloud

Bugs Code Smells Coverage Duplicated Lines (%) Lines of Code Maintainability Rating Quality Gate Status Reliability Rating Security Rating Technical Debt Vulnerabilities


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

starro-1.0.10.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

starro-1.0.10-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file starro-1.0.10.tar.gz.

File metadata

  • Download URL: starro-1.0.10.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.8.5 Linux/5.4.0-71-generic

File hashes

Hashes for starro-1.0.10.tar.gz
Algorithm Hash digest
SHA256 b66225b6f4e2bc015e742ce6b1a00a005a672ae84466e66316bf8d53cc3c4b15
MD5 b2e5892cc9d1fbfa2a4976a0801b6ee4
BLAKE2b-256 e38887c61a1bbd6f2cda1e12fe5a5d61b1755de9a19104e952570b4336c3c5c3

See more details on using hashes here.

File details

Details for the file starro-1.0.10-py3-none-any.whl.

File metadata

  • Download URL: starro-1.0.10-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.8.5 Linux/5.4.0-71-generic

File hashes

Hashes for starro-1.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 777cd287e5f8711d1ea19d5c5570594f6ba13c73d08f999a9303b4bcf8ae0abc
MD5 76a405919424fdf245222bc950fb46e4
BLAKE2b-256 c8f67a94b8faa458b0eb4e95e722a0053a1d8337bf0855bb92d090deace450a4

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