Skip to main content

dnif-logger

This is the official Python DNIF client library. This allows you to directly write log statements into your application code and integrate it with DNIF Adapters.

Installation

You can download the library using pip, as:

$ pip install dnif

Getting Started

The DNIF library currently supports two ingestion mechanisms: 1. TCP protocol uploads using the HTTP(S) endpoint 2. Uploads using the UDP protocol

Typical usages for both of these are given below.

TCP

from dnif.consumer import AsyncHttpConsumer
from dnif.logger import DnifLogger
dlog = DnifLogger(AsyncHttpConsumer('http://TARGET_IP:PORT/json/receive'))
dlog.log({'key': 'value'})

The AsyncHttpConsumer is thread-safe, so you can use the same instance across threads (recommended).

UDP

from dnif.consumer import AsyncUDPConsumer
from dnif.logger import DnifLogger
dlog = DnifLogger(AsyncUDPConsumer('UDP_IP', UDP_PORT))
dlog.log('Hello World')

The AsyncUDPConsumer is thread-safe, so you can use the same instance across threads (recommended).

Metadata

Release files for dnif 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dnif 1.0.2
File Size Uploaded Provenance Actions
dnif-1.0.2.tar.gz 4.5 kB Without provenance Details for dnif-1.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dnif 1.0.2
File Interpreter ABI Platform Actions
dnif-1.0.2-py2.py3-none-any.whl Python 2, Python 3 none any Details for dnif-1.0.2-py2.py3-none-any.whl

Total release size: 10.6 kB

Release files / dnif-1.0.2.tar.gz

Download URL dnif-1.0.2.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
45cd0d6ee31a88cd65b156301220e01496e32e4beb7627d8829ae18b9228260b
BLAKE2b-256 checksum
How to use checksums
3401358d7d6c560f998179432291312f66bd3078cbf86e55e98ce451006d55e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / dnif-1.0.2-py2.py3-none-any.whl

Download URL dnif-1.0.2-py2.py3-none-any.whl
Size 6.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
b55d3aa9d7921e3c698f3fd093e1d337dc13182a605b0c62804829c889a5237f
BLAKE2b-256 checksum
How to use checksums
c9bb355a3c6fb0e463563b87d57cabbde8fa63086eff1ece05af53f0d3bae344
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for dnif 1.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page