Skip to content

Commit

Permalink
docs(README): Improve syntax
Browse files Browse the repository at this point in the history
* Replace inline literal syntax with block literal
  • Loading branch information
tplessas committed Jun 20, 2022
1 parent 045e600 commit 2a5b4ee
Showing 1 changed file with 16 additions and 23 deletions.
39 changes: 16 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,34 @@ Fake data generators for everything Earth (and beyond!)

## Install

```
pip install faker-geoscience
```
pip install faker-geoscience

## Use

Base `faker` does not currently support locale resolution for dynamically linked providers, therefore
locale-specific Provider classes have to be linked explicitly using `Faker.add_provider()`,
or the containing module has to be passed to the Faker constructor (examples below).

```
from faker import Faker
from faker_geoscience import flora
# Example 1: Using Faker.add_provider()
f = Faker()
f.add_provider(flora.el_GR.Provider)
# Example 2: Passing to constructor
f = Faker(locale='el-GR', providers=['flora'])
# Module generators available - may be called
f.plant_name()
```
from faker import Faker
from faker_geoscience import flora

# Example 1: Using Faker.add_provider()
f = Faker()
f.add_provider(flora.el_GR.Provider)

# Example 2: Passing to constructor
f = Faker(locale='el-GR', providers=['flora'])

# Module generators available - may be called
f.plant_name()

## Build

```
python3 -m build
```
python3 -m build

## Test
```
tox
```

tox

## Contribute

Expand Down

0 comments on commit 2a5b4ee

Please sign in to comment.