Skip to main content

Discard data through devnull-as-a-service.com and other DAAS

Project description

py-devnullaas

is a python library to discard data through https://devnull-as-a-service.com and other DAAS endpoints.

Installation

pip install devnullaas

Usage

py-devnullaas provides NullStream, a file-like object to which you can write strings or bytes...es. Whatever the plural of bytes is.

from devnullaas import NullStream

devnull = NullStream()

password = 'hunter2'

devnull.write(password)
del password  # once it has been discarded remotely,
              # we can discard our local copy

Endpoint configuration

By default, NullStream uses https://devnull-as-a-service.com/dev/null, but you can specify any DAAS-compliant endpoint in the constructor:

devnull = NullStream(endpoint="http://devnull.local/dev/null")
devnull.write('foobar')

⚠️ Warning: Discarding data with an untrusted endpoint may result in compromised data. Usage with untrusted endpoints is not recommended.

Offline usage

NullStream can also be used offline by passing None as the endpoint. While much faster, this does not ensure safe discarding of data and should only be used in environments where no DAAS can be reached.

devnull = NullStream(endpoint=None)
devnull.write('foobar')
# has it truly been discarded? 🤷 I dunno

Disclaimer

While fully functional, this is a joke, and should not be taken seriously. Please do not use this. Please especially do not use this in production. I mean, if something like this somehow makes its way into production you have some bigger problems to fix, but still.

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

devnullaas-1.0.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

devnullaas-1.0.0-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file devnullaas-1.0.0.tar.gz.

File metadata

  • Download URL: devnullaas-1.0.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for devnullaas-1.0.0.tar.gz
Algorithm Hash digest
SHA256 7d6ba8312359bfcf087129fc2b18dca9906c0b2169f0376250c4990297532b72
MD5 3d9f8245ad43804a173f99585dfada18
BLAKE2b-256 4212c34f4a794f483ba92d876cd6caf3a7f2418fec2394da73de785c709c25df

See more details on using hashes here.

File details

Details for the file devnullaas-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for devnullaas-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c2601eed1988403274ff781f44226aff5530011d04b47ad3e639cfcd84e9ec54
MD5 33ae0b781760f77e95e87d365ff06582
BLAKE2b-256 d7fb65edf08f7b1681e834765b2682cb131327fc9bb7faa01d7fffaaa33fa775

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