Skip to main content

The EntX encryption library for python.

Reason this release was yanked:

Disfunctional Imports

Project description

EntX - The Python Encryption Library

EntX Encryption and Decryption

How to create an encryption client with password stored in an environment variable:

import os
import entx

client = entx.Client(os.environ["password"])

How to encrypt a string

import os
import entx

client = entx.Client(os.environ["password"])
to_encrypt = "This will be encrypted"
encrypted = client.encrypt(to_encrypt)

How to decrypt a string

import os
import entx

client = entx.Client(os.environ["password"])
to_decrypt = "This will be decrypted"
encrypted = client.decrypt(to_decrypt)

EntX Storage

JSON

EntX supports JSON reading and writing, allowing you to store and read dictionaries in the .json format, automatically encrypting and decrypting the data with the password provided.

How to create a JSON client with a password stored in an environment variable:

import os
from entx.storage import JSONClient

client = JSONClient(os.environ["password"])

How to convert a dictionary to an encrypted JSON string:

import os
from entx.storage import JSONClient

client = JSONClient(os.environ["password"])
to_encrypt_dictionary = {"keys": "values"}
dictionary_json_string = client.dumps(to_encrypt_dictionary)

How to write a dictionary to an encrypted JSON file:

import os
from entx.storage import JSONClient

client = JSONClient(os.environ["password"])
to_encrypt_dictionary = {"keys": "values"}
with open("demo.json", "w") as output_file:
    client.dump(to_encrypt_dictionary, output_file)

How to read a dictionary from an encrypted JSON string:

import os
from entx.storage import JSONClient

client = JSONClient(os.environ["password"])
encrypted_json_string = "your string here"
decrypted_dictionary = client.loads(encrypted_json_string)

How to read a dictionary from an encrypted JSON file:

import os
from entx.storage import JSONClient

client = JSONClient(os.environ["password"])
with open("demo.json", "r") as input_file:
    decrypted_dictionary = client.load(input_file)

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

entx-2.0.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

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

entx-2.0.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file entx-2.0.0.tar.gz.

File metadata

  • Download URL: entx-2.0.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for entx-2.0.0.tar.gz
Algorithm Hash digest
SHA256 b09c1910de45aa1ed28e69c863829c3ad56b5aa3e2c0f62401fea14d5e128414
MD5 70677db7386dd01a5f97514852f63c40
BLAKE2b-256 8c7f49da984bdcea39a09ca94def6ee5b098a25339fbd3b5c072f3645f0d5947

See more details on using hashes here.

File details

Details for the file entx-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: entx-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for entx-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 365043e50767c4b379d25c27755ee1de4c5c247129988b64de739fb85550b5d1
MD5 da1bed34fc559f5373313a198bf76ede
BLAKE2b-256 8ee7e185d5a565ff161638c4b1d28c9d3bd7de98ce4199d910c5fa78ce0273b6

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