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.fake_complex(1,2,3,4)
    ... (1.2157335093960198+3.17909803327301j)
    >>> numerics.fake_complex(1,2,3,4, round=True)
    ... (2+4j)
    >>> numerics.fake_int(1 ,20)
    ... 11
    >>> numerics.fake_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.fake_fullname()
    ... 'Justin Hall'
    >>> personal.names.fake_name()
    ... 'Johnny'
    >>> personal.names.fake_surname()
    ... 'Gill'
    
    >>> personal.phones.fake_international()
    ... '+67-910-8211582'
    >>> personal.phones.fake_international(mediator="")
    ... '+974665503991'
    >>> fake_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.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
  • Text data
  • Tables
    • ?
  • Unit tests
  • SQLAlchemy type casting
  • Django type casting
  • Sphinx docs
  • CI
  • Compilation request

Buy Me A Coffee

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.9.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

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

fakeit-0.1.9-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fakeit-0.1.9.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.3 CPython/3.8.1 Linux/5.5.7-1-MANJARO

File hashes

Hashes for fakeit-0.1.9.tar.gz
Algorithm Hash digest
SHA256 47495a8848bab56c46496e4686d72f51dd0d163089a427f3229e7da366ecab16
MD5 396377a7f98dd44eb8c778280762aacf
BLAKE2b-256 42d1bb24e745e29aa5f24e64578fdea3b6112d264da8c5eae4284ee8bd6783a0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fakeit-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 15.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.3 CPython/3.8.1 Linux/5.5.7-1-MANJARO

File hashes

Hashes for fakeit-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 0f33a429e84cf3c108feb31daf2656dae3c6f917bcf3396c75b11663c5117b72
MD5 b3721b3044b1759dd220998ea2117f41
BLAKE2b-256 f342ca538e1f1b2acb8286cc573be2cfc6d17763811da7b34d2df5c637248fe4

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