Build a Publish Request Dictionary

Helper for building a dictionary for the: analysis_engine.publish.publish function

analysis_engine.build_publish_request.build_publish_request(ticker=None, tickers=None, convert_to_json=False, output_file=None, compress=False, redis_enabled=False, redis_key=None, redis_address='localhost:6379', redis_db=0, redis_password=None, redis_expire=None, redis_serializer='json', redis_encoding='utf-8', s3_enabled=False, s3_key=None, s3_address='0.0.0.0:9000', s3_bucket='pricing', s3_access_key='trexaccesskey', s3_secret_key='trex123321', s3_region_name='us-east-1', s3_secure=False, slack_enabled=False, slack_code_block=False, slack_full_width=False, verbose=False, label='publisher')[source]

Build a dictionary for helping to quickly publish to multiple optional endpoints: - a local file path (output_file) - minio (s3_bucket and s3_key) - redis (redis_key) - slack

Parameters:
  • ticker – ticker
  • tickers – optional - list of tickers
  • label – optional - algo log tracking name
  • output_file – path to save the data to a file
  • compress – optional - compress before publishing
  • verbose – optional - boolean to log output
  • kwargs – optional - future argument support

(Optional) Redis connectivity arguments

Parameters:
  • redis_enabled – bool - toggle for auto-caching all datasets in Redis (default is ENABLED_REDIS_PUBLISH)
  • redis_key – string - key to save the data in redis (default is None)
  • redis_address – Redis connection string format: host:port (default is REDIS_ADDRESS)
  • redis_db – Redis db to use (default is REDIS_DB)
  • redis_password – optional - Redis password (default is REDIS_PASSWORD)
  • redis_expire – optional - Redis expire value (default is REDIS_EXPIRE)
  • redis_serializer – not used yet - support for future pickle objects in redis (default is json)
  • redis_encoding – format of the encoded key in redis (default is utf-8)

(Optional) Minio (S3) connectivity arguments

Parameters:
  • s3_enabled – bool - toggle for auto-archiving on Minio (S3) (default is ENABLED_S3_UPLOAD)
  • s3_key – string - key to save the data in redis (default is None)
  • s3_address – Minio S3 connection string format: host:port (default is S3_ADDRESS)
  • s3_bucket – S3 Bucket for storing the artifacts (default is S3_BUCKET) which should be viewable on a browser: http://localhost:9000/minio/dev/
  • s3_access_key – S3 Access key (default is S3_ACCESS_KEY)
  • s3_secret_key – S3 Secret key (default is S3_SECRET_KEY)
  • s3_region_name – S3 region name (default is S3_REGION_NAME)
  • s3_secure – Transmit using tls encryption (default is S3_SECURE)

(Optional) Slack arguments

Parameters:
  • slack_enabled – optional - boolean for publishing to slack
  • slack_code_block – optional - boolean for publishing as a code black in slack
  • slack_full_width – optional - boolean for publishing as a to slack using the full width allowed