Skip to main content

DataClient

Introduction

this is a request tool which packaging method server

Usage

from stormer import Requester

# init Requester instance
requester = Requester(
    "https://www.baidu.com", 
    redis_url="redis://127.0.0.1:6379/0", 
    # redis_nodes="127.0.0.1:7000,127.0.0.1:7001,127.0.0.1:7002", 
    # redis_password="",
    timeout=30, # in seconds,global cache timeout
    # headers={"Content-Type": "text/html;charset=utf8"},
    encoding='utf8'
)

# open debug
requester.set_debugging()

# register request function
requester.register(
    action="get", 
    func="bd_index", 
    uri="/", 
    timeout=5  # in second, this requester cache timeout
)

# execute function
rlt = requester.bd_index()
r_byte = rlt.bytes
print(rlt.data)
print(rlt.resp)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stormer-0.1.2.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

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

stormer-0.1.2-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file stormer-0.1.2.tar.gz.

File metadata

  • Download URL: stormer-0.1.2.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.6.12

File hashes

Hashes for stormer-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d4eb557ac2662a0def1078549fcd300b3d52e85c5efb75444b36623ebb3db6c3
MD5 be4c8462447b81850e42cf2b826825aa
BLAKE2b-256 d8bf3c63fe1d672d471ca7195ef9fa0b63d8440f1b1cc9c665c0c26ff7558a3a

See more details on using hashes here.

File details

Details for the file stormer-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: stormer-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.6.12

File hashes

Hashes for stormer-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 98bbe857e8dc6059c57535794024ad1e661b408fa24f32da07f0bd9c5de948d3
MD5 2ea6829d404e2f8562947187d45e65f6
BLAKE2b-256 e4789a26335573103e628b1496c1351a36f4931967b5b48f4fc821f17a93b05c

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 files

0.1.1

2 files

0.0.5

2 files

0.0.2

2 files

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