Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Generic python utilities

Project description

python library DNA
==================

[![Coverage Status](https://coveralls.io/repos/hivetech/dna/badge.png)](https://coveralls.io/r/hivetech/dna)

> Generic python utilities

Installation
------------

```console
pip install dna
```

Example
-----

```python
import dna.utils as utils
import dna.logger as logger

log_setup = logger.setup(level='info', filename='app.log')
log = logger.logger(__name__)
with log_setup.applicationbound():

log.info('hello', where='world')

useless_id = utils.generate_unique_id()
useless_name = utils.generate_random_name()

if utils.docker_check() and utils.is_running('ipyhon'):

print utils.Version('0.4.1')

module = utils.dynamic_import('dna.settings', 'LOG')
print utils.emphasis(module, align=False)

print utils.self_ip()
```

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for dna, version 0.0.7
Filename, size File type Python version Upload date Hashes
Filename, size dna-0.0.7.tar.gz (11.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page