root/dev/: dmiv-3.3.0 metadata and description

Simple index

Invoice Service for Darsman Academy

author Ellnamin
author_email ellnamin.business@gmail.com
requires_dist
  • annotated-types==0.6.0
  • grpcio==1.62.1
  • grpcio-tools==1.62.1
  • protobuf==4.25.3
  • pydantic==2.7.0
  • pydantic-settings==2.10.1
  • pydantic-core==2.18.1
  • python-dotenv==1.1.1
  • typing-inspection==0.4.1
  • typing-extensions==4.14.1

Because this project isn't in the mirror_whitelist, no releases from root/pypi are included.

File Tox results History
dmiv-3.3.0-py3-none-any.whl
Size
10 KB
Type
Python Wheel
Python
3
  • Uploaded to root/dev by root 2026-02-08 14:17:54
dmiv-3.3.0.tar.gz
Size
10 KB
Type
Source
  • Uploaded to root/dev by root 2026-02-08 14:17:55
# Darsman Invoice Service

## Requirements

- Python (== 3.10)
- grpcio-tools (>=1.62.1)
- pydantic (>=2.7.0)

## Installation

Run the following command using pip:

```bash
pip install dmiv
```

## Sample code

```python
import asyncio
from dmcb import Invoice

# see `Env example` for confgs, you may want to only fill host,port and api_key
invoice = Invoice()

async def main():
# Get one invoice using its tracking_code
result = await invoice.inquiry(
tracking_code="b2f6c8e2-7e3a-4cb3-a58e-ef4e3f893708",
request_id= "request id", # Optional: default to None
timeout="3.5", # Optional: override default timeout
wait_for_ready=True # Optional: wait for channel if not ready
)
print(result)

if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.run_until_complete(main())

```

## Env example

```python
### === INVOICE SDK CONFIG === ###

# Server config
INVOICE_SDK_HOST=127.0.0.1
INVOICE_SDK_PORT=50051
INVOICE_SDK_API_KEY=your_api_key_here

# Graceful shutdown
INVOICE_SDK_CHANNEL_SHUTDOWN_GRACE=10

# Keepalive (for long-lived connection health checks)
INVOICE_SDK_KEEPALIVE_TIME_MS=60000
INVOICE_SDK_KEEPALIVE_TIMEOUT_MS=5000
INVOICE_SDK_KEEPALIVE_PERMIT_WITHOUT_CALLS=1
INVOICE_SDK_MAX_PINGS_WITHOUT_DATA=0

# Retry policy
INVOICE_SDK_MAX_ATTEMPTS=5 # more than 5 isn't allowed by grpc
INVOICE_SDK_INITIAL_BACKOFF=0.1s
INVOICE_SDK_MAX_BACKOFF=1.5s
INVOICE_SDK_BACKOFF_MULTIPLIER=2.0
INVOICE_SDK_RETRYABLE_STATUS_CODES=["UNAVAILABLE", "RESOURCE_EXHAUSTED", "ABORTED"]

# RPC-level configs
INVOICE_SDK_WAIT_FOR_READY=true
INVOICE_SDK_TIMEOUT=5.0
```


Render warnings:
<string>:19: (WARNING/2) Inline literal start-string without end-string.