Skip to main content

Generate fake data

Project description

Meet the FAKE IT project which provide generating simple fake data


INSTALL:

USAGE:

Generating fake data for python types

Bytes

    >>> from fakeit import bytes
    >>> bytes.fake_bytes(min_length=2, max_length=5)
    ... b'/\xf5Q\x9a\xcd'

    >>> bytes.fake_b64(min_length=2, max_length=5)
    ... b'QpwJug=='

Hashes

    >>> from fakeit import hashes
    >>> hashes.fake_md5()
    ... '37c6c63ee4dd8516d3d8ee4319b3e7b8'
    >>> hashes.fake_sha256()
    ... 'bc6c64d150e869cf10e3d9c0cf582fa78fe46282de75911b464c46a023a08038'

Numerics

    >>> from fakeit import numerics
    >>> numerics.get_complex(1,2,3,4)
    ... (1.2157335093960198+3.17909803327301j)
    >>> numerics.get_complex(1,2,3,4, round=True)
    ... (2+4j)
    >>> numerics.get_int(1 ,20)
    ... 11
    >>> numerics.get_float(1, 20)
    ... 3.448023122876366

Strings

    >>> from fakeit import strings
    >>> strings.fake_string(min_length=5, max_length=5)
    ... 'CPOcO'

    >>> fake_string(min_length=5, max_length=5, unique=True)
    ... 'qEiwW'

    >>> fake_string(min_length=5, max_length=5, alphabet="ABCdE")
    ... 'EdBdB'

    >>> fake_strings(5)
    ... <generator object fake_strings at 0x7f67579e4660>

    >>> for i in fake_strings(5):
    >>>     print(i)
    >>>
    ... 1r3OxTKis20KF
    ... 
    ... 3YN28kOPLuc
    ... DaLQ
    ... j7J9MMJcF2

    >>> for i in all_combinations_with_replacement_fake_string(min_length=3, max_length=3, alphabet="abc"):
    >>>     print(i)
    ... aaa
    ... aab
    ... aac
    ... abb
    ... abc
    ... acc
    ... bbb
    ... bbc
    ... bcc
    ... ccc

Personal

    >>> from fakeit import personal
    >>> personal.names.get_fullname()
    ... 'Justin Hall'
    >>> personal.names.get_name()
    ... 'Johnny'
    >>> personal.names.get_surname()
    ... 'Gill'

    >>> personal.phones.get_international()
    ... '+67-910-8211582'
    >>> personal.phones.get_international(mediator="")
    ... '+974665503991'
    >>> get_international(country_code=7, area_code=923)
    ... '+7-923-4915850'

    >>> personal.emails.fake_email()
    ... '0mfJz0QD@VqujvpRDiuMfuyB.VRQfn'
    >>> personal.emails.fake_enough_email()
    ... 'Henry.Hill@google.cn'

    >>> personal.get_fake_person()
    ... <Person Stephen Robertson> (FirstName=Stephen, LastName=Robertson, Email=Stephen.Robertson@whatsapp.net, Phone=+1-990-5674435)

TODO:

  • Geo
    • Position
    • Named (Country, City, and etc.)
    • Address
  • Special
    • UUIDS
  • Text data
  • Tables
    • ?
  • Unit tests
  • SQLAlchemy type casting
  • Django type casting
  • Sphinx docs
  • CI
  • Compilation request

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

fakeit-0.1.1.tar.gz (9.0 kB view details)

Uploaded Source

Built Distributions

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

fakeit-0.1.1-py3.7.egg (21.7 kB view details)

Uploaded Egg

fakeit-0.1.1-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file fakeit-0.1.1.tar.gz.

File metadata

  • Download URL: fakeit-0.1.1.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.1 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.2

File hashes

Hashes for fakeit-0.1.1.tar.gz
Algorithm Hash digest
SHA256 466b0c51c96695c3cb80d5592c72b977821aaa95c501f755a65719d993c77c51
MD5 d54ff437fe32a4c28543ceace801a7fa
BLAKE2b-256 fc75de949fe9e72c3d4d2d0b80c5aac099314b9d669e3b4a756572a4e6fd6a20

See more details on using hashes here.

File details

Details for the file fakeit-0.1.1-py3.7.egg.

File metadata

  • Download URL: fakeit-0.1.1-py3.7.egg
  • Upload date:
  • Size: 21.7 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.1 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.2

File hashes

Hashes for fakeit-0.1.1-py3.7.egg
Algorithm Hash digest
SHA256 11e52cd523ddd235ae7785e537d7dd32d43c7d70e329a4cae3b3893028be198b
MD5 57f0a35f638ec0500673531a8d18919d
BLAKE2b-256 b322315a36b0650dd5002057c83899bc77da693c4082c83b5e32affa2360898b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fakeit-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.1 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.2

File hashes

Hashes for fakeit-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f22dd896fb2784e4c9b2330a9f0a4258349a3125e01a1e5a187392b1fc4fba9e
MD5 0bb96975b62ae5d10dfd0c7d612c809c
BLAKE2b-256 91738d43d13cebd9d76b91c3fbe7144cc0cad8470cc185ff79819ebfc0888dac

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