Skip to main content

Generate fake log based on instacart dataset

Project description

Project description

install

pip install instacart-log-generator

Code

from instacart_log_generator.my_gen_log import InstacartLogGenerator

LOGGING_FILE_PATH = 'file_path_where_you_want.log'
LOG_PER_SECOND = 1

InstacartLogGenerator().logging(LOGGING_FILE_PATH, LOG_PER_SECOND)

Result

162.232.228.1 - - [17/Jan/2022:17:11:16 +0900] "POST /order HTTP/1.1" 400 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 8_4 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) GSA/7.0.55539 Mobile/12H143 Safari/600.1.4"
162.232.228.1 - - [17/Jan/2022:17:11:16 +0900] {"order_id": 3375775, "product_id": 21903, "add_to_cart_order": 2, "reordered": 1, "aisle_id": 123, "department_id": 4, "order_number": 4, "order_dow": 4, "order_hour_of_day": 11, "days_since_prior_order": 17}
51.117.186.246 - - [17/Jan/2022:17:11:17 +0900] "GET /order HTTP/1.1" 200 "-" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36"

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

instacart_log_generator-0.1.1-py3-none-any.whl (198.5 kB view details)

Uploaded Python 3

File details

Details for the file instacart_log_generator-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: instacart_log_generator-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 198.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.9

File hashes

Hashes for instacart_log_generator-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d445c2ae6d00d306357aa203273afb209817d8c10fc09ec8896cc6ec7e0d0066
MD5 4f7f00c70747359af03e867324a23d53
BLAKE2b-256 3327b0815a793d5184089d815515407bb594a7b869408a85a71584b4eaeb30a3

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