summaryrefslogtreecommitdiff
path: root/venv/lib/python3.11/site-packages/faker/providers/profile
diff options
context:
space:
mode:
Diffstat (limited to 'venv/lib/python3.11/site-packages/faker/providers/profile')
-rw-r--r--venv/lib/python3.11/site-packages/faker/providers/profile/__init__.py60
-rw-r--r--venv/lib/python3.11/site-packages/faker/providers/profile/__pycache__/__init__.cpython-311.pycbin4301 -> 0 bytes
-rw-r--r--venv/lib/python3.11/site-packages/faker/providers/profile/en_US/__init__.py5
-rw-r--r--venv/lib/python3.11/site-packages/faker/providers/profile/en_US/__pycache__/__init__.cpython-311.pycbin496 -> 0 bytes
4 files changed, 0 insertions, 65 deletions
diff --git a/venv/lib/python3.11/site-packages/faker/providers/profile/__init__.py b/venv/lib/python3.11/site-packages/faker/providers/profile/__init__.py
deleted file mode 100644
index 6f909e0..0000000
--- a/venv/lib/python3.11/site-packages/faker/providers/profile/__init__.py
+++ /dev/null
@@ -1,60 +0,0 @@
-import itertools
-
-from datetime import date
-from decimal import Decimal
-from typing import Dict, List, Optional, Tuple, Union
-
-from ...typing import SexLiteral
-from .. import BaseProvider
-
-
-class Provider(BaseProvider):
- """
- This provider is a collection of functions to generate personal profiles and identities.
-
- """
-
- def simple_profile(self, sex: Optional[SexLiteral] = None) -> Dict[str, Union[str, date, SexLiteral]]:
- """
- Generates a basic profile with personal informations
- """
- sex_ = self.random_element(["F", "M"]) if sex is None else sex
- if sex_ == "F":
- name = self.generator.name_female()
- elif sex_ == "M":
- name = self.generator.name_male()
- return {
- "username": self.generator.user_name(),
- "name": name,
- "sex": sex_,
- "address": self.generator.address(),
- "mail": self.generator.free_email(),
- "birthdate": self.generator.date_of_birth(),
- }
-
- def profile(
- self, fields: Optional[List[str]] = None, sex: Optional[SexLiteral] = None
- ) -> Dict[str, Union[str, Tuple[Decimal, Decimal], List[str], date]]:
- """
- Generates a complete profile.
- If "fields" is not empty, only the fields in the list will be returned
- """
- if fields is None:
- fields = []
-
- d = {
- "job": self.generator.job(),
- "company": self.generator.company(),
- "ssn": self.generator.ssn(),
- "residence": self.generator.address(),
- "current_location": (self.generator.latitude(), self.generator.longitude()),
- "blood_group": "".join(self.random_element(list(itertools.product(["A", "B", "AB", "O"], ["+", "-"])))),
- "website": [self.generator.url() for _ in range(1, self.random_int(2, 5))],
- }
-
- d = dict(d, **self.generator.simple_profile(sex))
- # field selection
- if len(fields) > 0:
- d = {k: v for k, v in d.items() if k in fields}
-
- return d
diff --git a/venv/lib/python3.11/site-packages/faker/providers/profile/__pycache__/__init__.cpython-311.pyc b/venv/lib/python3.11/site-packages/faker/providers/profile/__pycache__/__init__.cpython-311.pyc
deleted file mode 100644
index 057dbfc..0000000
--- a/venv/lib/python3.11/site-packages/faker/providers/profile/__pycache__/__init__.cpython-311.pyc
+++ /dev/null
Binary files differ
diff --git a/venv/lib/python3.11/site-packages/faker/providers/profile/en_US/__init__.py b/venv/lib/python3.11/site-packages/faker/providers/profile/en_US/__init__.py
deleted file mode 100644
index e7f101f..0000000
--- a/venv/lib/python3.11/site-packages/faker/providers/profile/en_US/__init__.py
+++ /dev/null
@@ -1,5 +0,0 @@
-from .. import Provider as ProfileProvider # pragma: no cover
-
-
-class Provider(ProfileProvider): # pragma: no cover
- pass
diff --git a/venv/lib/python3.11/site-packages/faker/providers/profile/en_US/__pycache__/__init__.cpython-311.pyc b/venv/lib/python3.11/site-packages/faker/providers/profile/en_US/__pycache__/__init__.cpython-311.pyc
deleted file mode 100644
index 8130e40..0000000
--- a/venv/lib/python3.11/site-packages/faker/providers/profile/en_US/__pycache__/__init__.cpython-311.pyc
+++ /dev/null
Binary files differ