Skip to main content

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

Release files for fakeit 0.1.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fakeit 0.1.10
File Size Uploaded
fakeit-0.1.10.tar.gz 12.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fakeit 0.1.10
File Interpreter ABI Platform
fakeit-0.1.10-py3-none-any.whl Python 3 none any Details

Total release size: 27.1 kB

Release files / fakeit-0.1.10.tar.gz

Download URL fakeit-0.1.10.tar.gz
Size 12.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b68d6c21d14a523dc71b05d0578039e51a5df15766798e9f958e024844e35c15
BLAKE2b-256 checksum
How to use checksums
cbb120224d9854a6a9a2e83cf11f257614c712e1bc94996f178bf1e991571d8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.9 CPython/3.8.5 Linux/5.7.19-2-MANJARO

Release files / fakeit-0.1.10-py3-none-any.whl

Download URL fakeit-0.1.10-py3-none-any.whl
Size 15.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1bf406d9992ad64135f3815f286e25972100ddbbd2aa3a4ecc0b0b9fba3d5723
BLAKE2b-256 checksum
How to use checksums
f4427af2ba1787b666a4b8ef51da4a478cc74365d2d87b98b359fb4d2b4d48be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.9 CPython/3.8.5 Linux/5.7.19-2-MANJARO

Release history Release notifications | RSS feed

This release

0.1.10 This release

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

3 release files

0.1.0

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page