File: types.py

package info (click to toggle)
python-maxminddb 3.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,600 kB
  • sloc: ansic: 7,565; python: 1,711; perl: 987; makefile: 273; sh: 190
file content (15 lines) | stat: -rw-r--r-- 429 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
"""Types representing database records."""

from __future__ import annotations

from typing import AnyStr, TypeAlias

Primitive: TypeAlias = AnyStr | bool | float | int

RecordList: TypeAlias = list["Record"]
"""RecordList is a type for lists in a database record."""

RecordDict: TypeAlias = dict[str, "Record"]
"""RecordDict is a type for dicts in a database record."""

Record: TypeAlias = Primitive | RecordList | RecordDict