Skip to main content

No project description provided

Project description

dataflow-sdk

Example

from datetime import datetime

from dataflow_sdk import save_items, Record
from dataflow_sdk.entity.model import SinkType

result = {
    'name': 'xiaoming',
    "age": 25,
    "time": datetime.now().strftime("%Y-%m-%d %H:%M:%S"),
    "hello": "world",
    "world": 1121211
}

records = [Record(
    parent_url="https://www.json.cn",
    sink_type=SinkType.ITEM,
    store_key=f"https://www.json.cn{x}/",
    data=result,
    metadata={"name": "gage"},
) for x in range(10)]

save_items('77963b7a931377ad4ab5ad6a9cd718aa', records)

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

dataflow_sdk-0.2.0.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dataflow_sdk-0.2.0-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file dataflow_sdk-0.2.0.tar.gz.

File metadata

  • Download URL: dataflow_sdk-0.2.0.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.10.18 Linux/4.4.0-22621-Microsoft

File hashes

Hashes for dataflow_sdk-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ed05dbeeb93a2beaf1ecf9190afdb854c8324e92d2bfc82be35be83470e0a722
MD5 9cd172d4396f23a2ce80e65be4823823
BLAKE2b-256 c33ce30ceffe7fcd1d3bd51c0ee19684c7a86f7df034c4bd80f33ff8e0f3beef

See more details on using hashes here.

File details

Details for the file dataflow_sdk-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: dataflow_sdk-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 13.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.10.18 Linux/4.4.0-22621-Microsoft

File hashes

Hashes for dataflow_sdk-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fbfe31873c64baa36ad017cd4c7f965740806fa5c5dbca41af13ee2a3e9a4b08
MD5 f3b1787a3c2d17dc74c2f86cbd18278f
BLAKE2b-256 4dfe0c91a5f87c70114ad8765ba8e5436dd77d563b1b9801e405837b4ef79e25

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page