Skip to main content

Generate fake log based on instacart dataset

Project description

Instacart Log Generator

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"

What's New

Jan 19, 2022

  • Add department category. It can generate more various url
  • Add request_type and url to body log. It looks more real on now
  • Log the body value only when the order url and response code is 200.
  • Logs are generally chronological, but there are logs that are not chronological to implement log out of the same ip user.

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.6-py3-none-any.whl (199.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: instacart_log_generator-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 199.1 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 9ac10a3940fa46ec6d3d21930b7a03e176ea17672367e7745d0228c84cb2b640
MD5 e9646dffc01c5b6dc288358ba548bb4a
BLAKE2b-256 1356bcb8241d51e9b0531523c66c494d5854cd2de648d51e6a908c43ad280d5a

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