Skip to content

Commit

Permalink
Merge pull request #3 from barseghyanartur/dev
Browse files Browse the repository at this point in the history
dev -> main
  • Loading branch information
barseghyanartur authored Nov 27, 2023
2 parents 6bb0524 + af214a0 commit 23881c5
Show file tree
Hide file tree
Showing 5 changed files with 555 additions and 13 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ are used for versioning (schema follows below):
0.3.4 to 0.4).
- All backwards incompatible changes are mentioned in this document.

0.1.3
-----
2023-11-28

- Added ``pdf_file``, ``docx_file``, ``png_file``, ``svg_file``, ``bmp_file``,
``gif_file`` support.
- Added storages.

0.1.2
-----
2023-11-26
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Update version ONLY here
VERSION := 0.1.2
VERSION := 0.1.3
SHELL := /bin/bash
# Makefile for project
VENV := ~/.virtualenvs/fake.py/bin/activate
Expand Down
137 changes: 135 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ Overview
various types of random data for testing and other purposes. The package
provides a simplified, dependency-free alternative for generating random
words, sentences, paragraphs, file names, URLs, person names, as well as
bytes content for PDF-, DOCX- and various image formats (such as ``PNG``,
``SVG``, ``BMP`` and ``GIF``).
bytes content for ``PDF``-, ``DOCX``- and various image formats (such as
``PNG``, ``SVG``, ``BMP`` and ``GIF``). It also can create files directly
on your filesystem.

Requirements
============
Expand Down Expand Up @@ -434,6 +435,138 @@ Arguments:
default set to ``1``, but if ``texts`` is given, the value of ``nb_pages``
is adjusted accordingly.

----

**pdf_file**

Generates a ``PDF`` file.

.. code-block:: python
FAKER.pdf_file()
Arguments:

.. note::

Accepts all arguments of ``pdf`` + the following:

- ``storage`` (type: ``BaseStorage``, default value: ``None``) is an optional
argument.
- ``basename`` (type: ``str``, default value: ``None``) is an optional
argument.
- ``prefix`` (type: ``str``, default value: ``None``) is an optional argument.

----

**png_file**

Generates a ``PNG`` file.

.. code-block:: python
FAKER.png_file()
Arguments:

.. note::

Accepts all arguments of ``png`` + the following:

- ``storage`` (type: ``BaseStorage``, default value: ``None``) is an optional
argument.
- ``basename`` (type: ``str``, default value: ``None``) is an optional
argument.
- ``prefix`` (type: ``str``, default value: ``None``) is an optional argument.

----

**svg_file**

Generates an ``SVG`` file.

.. code-block:: python
FAKER.svg_file()
Arguments:

.. note::

Accepts all arguments of ``svg`` + the following:

- ``storage`` (type: ``BaseStorage``, default value: ``None``) is an optional
argument.
- ``basename`` (type: ``str``, default value: ``None``) is an optional
argument.
- ``prefix`` (type: ``str``, default value: ``None``) is an optional argument.

----

**bmp_file**

Generates a ``BMP`` file.

.. code-block:: python
FAKER.bmp_file()
Arguments:

.. note::

Accepts all arguments of ``bmp`` + the following:

- ``storage`` (type: ``BaseStorage``, default value: ``None``) is an optional
argument.
- ``basename`` (type: ``str``, default value: ``None``) is an optional
argument.
- ``prefix`` (type: ``str``, default value: ``None``) is an optional argument.

----

**gif_file**

Generates a ``GIF`` file.

.. code-block:: python
FAKER.gif_file()
Arguments:

.. note::

Accepts all arguments of ``gif`` + the following:

- ``storage`` (type: ``BaseStorage``, default value: ``None``) is an optional
argument.
- ``basename`` (type: ``str``, default value: ``None``) is an optional
argument.
- ``prefix`` (type: ``str``, default value: ``None``) is an optional argument.

----

**txt_file**

Generates a ``TXT`` file.

.. code-block:: python
FAKER.txt_file()
Arguments:

.. note::

Accepts all arguments of ``text`` + the following:

- ``storage`` (type: ``BaseStorage``, default value: ``None``) is an optional
argument.
- ``basename`` (type: ``str``, default value: ``None``) is an optional
argument.
- ``prefix`` (type: ``str``, default value: ``None``) is an optional argument.

Tests
=====

Expand Down
Loading

0 comments on commit 23881c5

Please sign in to comment.