Skip to main content

Vehicle related Provider for the Faker Python package.

Project description

Latest version released on PyPi Build status of the master branch on Mac/Linux Test coverage Apache license version 2.0

faker_vehicle is a provider for the Faker Python package.

It provides vehicle and machinery related fake data for testing purposes:

  • Vehicle Make

  • Vehicle Model

  • Vehicle Make / Model

  • Vehicle Make / Model / Year

  • Vehicle Make / Model / Category

  • Vehicle Year

  • Vehicle Object (you can format)

  • Machine Make

  • Machine Model

  • Machine Make / Model

  • Machine Make / Model / Year

  • Machine Make / Model / Category

  • Machine Year

  • Machine Object (you can format)

Usage

Install with pip:

pip install faker_vehicle

Or install with setup.py

git clone https://github.com/kennethwsmith/faker_vehicle.git
cd faker_vehicle && python setup.py install

Add the VehicleProvider to your Faker instance:

from faker import Faker
from faker_vehicle import VehicleProvider

fake = Faker()
fake.add_provider(VehicleProvider)

fake.vehicle_year_make_model()
# 2014 Volkswagen Golf
fake.vehicle_year_make_model_cat()
# 1996 Dodge Ram Wagon 1500 (Van/Minivan)
fake.vehicle_make_model()
# Volvo V40
fake.vehicle_make()
# BMW
fake.vehicle_model()
# SL
fake.vehicle_year()
# 2008
fake.vehicle_category()
# Wagon
json.dumps(fake.vehicle_object())
# {"Year": 1996, "Make": "Chrysler", "Model": "New Yorker", "Category": "Sedan"}

fake.machine_year_make_model()
# 2008 Caterpillar 5511C
fake.machine_year_make_model_cat()
# 2008 Caterpillar 5511C (Feller Buncher)
fake.machine_make_model()
# Caterpillar 5511C
fake.machine_make()
# Caterpillar
fake.machine_model()
# 5511C
fake.machine_year()
# 2008
fake.machine_category()
# Feller Buncher
json.dumps(fake.machine_object())
# {"Year": 2008, "Make": "Caterpillar", "Model": "5511C", "Category": "Feller Buncher"}

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

faker_vehicle-0.2.0.tar.gz (149.6 kB view hashes)

Uploaded source

Built Distribution

faker_vehicle-0.2.0-py2.py3-none-any.whl (162.4 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page