A Python implementation of the Simple Data Transfer Protocol data structures, function, and server
Project description
The Simple Data Transfer Protcol
This is a reference server and library for the Simple Data Transfer Protocol. It demonstrates the Simple Data Transfer Protocol Server API. It also functions as an open framework, so new Tables can be attached to the Simple Data Transfer Protocol server by providing a Class with a get_rows()
method and a columns
property.
The README.md file in each directory gives the documentation for the utilities and classes in that directory.
The structure is as follows:
├── sdtp
│ ├── sdtp_server: A reference SDTP server and middleware
│ ├── sdtp: The basic SDTP types, including Filters and Tables
# The Simple Data Transfer Protocol
The SDTP Server implements the Simple Data Transfer Protocol, a universal way to query and transmit tabular data. The SDTP uses http/https as the underlying transport protocol. There is no client; rather, a program accessing an SDTP server creates a `RemoteSDMLTable` (see `sdtp.sdtp_table.py`) and accesses that through the standard SDTP Table methods.
This is a quick summary of the Simple Data Transfer Protocol. A more extended description can be found at:
## Basic Data Structure
The core data structure of the SDTP is a _table_, which is simply a list of list of values. Conceptually, it is equivalent to a SQL database table; each column has a specific type and each row is of the same, fixed length. The Python definitions are in sdtp.sdtp_table.py. `Columns` is the only mandatory entry for a table. It is a list of columns, each of which is a dictionary with two mandatory fields: `name` and `type`. Other fields (e.g., to express units or other metadata) are permitted.
The Python implementation of table types is in `sdtp.sdtp_table.py`
### Simple Data Transfer Protocol Data Types
This is a list of the permissible types. Each column of a table is of one of these types
See sdtp.sdtp_utils.py. The native types these convert to are language-specific
1. SDML_STRING: A string. In Python, class str.
2. SDML_NUMBER: A real or an integer. In Python, class float or class int.
3. SDML_BOOLEAN: true or false. In Python, class bool.
4. SDML_DATE: A date. In Python, class datetime.date
5. SDML_DATETIME: A datetime. In Python, class datetime.datetime
6. SDML_TIME_OF_DAY: A time. In Python, class datetime.time
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
Built Distribution
File details
Details for the file sdtp-0.2.4.tar.gz
.
File metadata
- Download URL: sdtp-0.2.4.tar.gz
- Upload date:
- Size: 36.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e482d6d6658ec9709359fec7468b7b50ec0f9e9928ecfaa022a12b6af7a8319b |
|
MD5 | d435ff40c3b5e810192da1647094d61b |
|
BLAKE2b-256 | 085196e17fb8ecaf698c9a9654e07e1d1c7a5b49c43b55550c779fb6f8a0953c |
File details
Details for the file sdtp-0.2.4-py2.py3-none-any.whl
.
File metadata
- Download URL: sdtp-0.2.4-py2.py3-none-any.whl
- Upload date:
- Size: 30.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7efacd8b6709e98e5e1a257761afcec27837ee55530f185ac76e22288f1322bd |
|
MD5 | 45d7370286a1248512a0041916718d3b |
|
BLAKE2b-256 | c8964856b1e3f55f00d9037935b6e18d4d26c3bc44d1d2e0880224448ce701d5 |