Skip to main content

vendor request of taiqiyun [private]

Project description

tivendor

Usage

from tivendor import TiVendor

config =  {
    'TIADMIN_HOST': os.getenv('TIADMIN_HOST', 'http://tiadmin.kong:8000'),
    'KAFKA_HOST': os.getenv('KAFKA_HOST', 'kafka-kafka.kafka:9092'),
    'KAFKA_TOPIC': os.getenv('KAFKA_TOPIC', 'supplier-request'),
    'KAFKA_ENABLE': os.getenv('KAFKA_ENABLE', 'on'),
    'DEFAULT_SERVICE_NAME': os.getenv('DEFAULT_SERVICE_NAME', 'default_service_name'),
    'LOGGER_NAME': os.getenv('LOGGER_NAME', 'main'),
    'REDIS_HOST': os.getenv('REDIS_HOST', 'supplier-redis'),
    'REDIS_PORT': os.getenv('REDIS_PORT', 6379),
    'REDIS_DB': os.getenv('REDIS_DB', 0),
    'REDIS_PASSWORD': os.getenv('REDIS_PASSWORD', None),
    'SM4_SECRET': os.getenv('SM4_SECRET', ''),  # 可以通过调用 api 获取
}
vendor = TiVendor(config)

r = vendor.request('bqsblmatch-test', service_name='bqsblmatch', ti_request_headers={}, json={'name': 'Johnny',})
print(r.json())

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

tivendor-0.0.30.tar.gz (4.2 kB view details)

Uploaded Source

File details

Details for the file tivendor-0.0.30.tar.gz.

File metadata

  • Download URL: tivendor-0.0.30.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.4.2 requests/2.23.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.6.5

File hashes

Hashes for tivendor-0.0.30.tar.gz
Algorithm Hash digest
SHA256 3d846e7e018dfcbf79f42e80d2f88ea77de450daf352b57c388c6fce7fa8f03d
MD5 5aa1e820457a71aa44503a189804893e
BLAKE2b-256 fc1a846f2bf3ac55457f739add66919d23c025c66185cd27a1e81f6c61882a54

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