mex.blueant package¶
Subpackages¶
- mex.blueant.models package
- Submodules
- mex.blueant.models.person module
- mex.blueant.models.project module
BlueAntClient
BlueAntProject
BlueAntProject.clients
BlueAntProject.departmentId
BlueAntProject.end
BlueAntProject.model_computed_fields
BlueAntProject.model_config
BlueAntProject.model_fields
BlueAntProject.name
BlueAntProject.number
BlueAntProject.projectLeaderId
BlueAntProject.start
BlueAntProject.statusId
BlueAntProject.typeId
BlueAntProjectResponse
- mex.blueant.models.source module
- Module contents
Submodules¶
mex.blueant.connector module¶
- class mex.blueant.connector.BlueAntConnector¶
Bases:
HTTPConnector
Connector class to handle authentication and requesting the Blue Ant API.
- _get_json_from_api(relative_url: str) dict[str, Any] ¶
Get json from blueant api.
- Parameters:
relative_url (str) – relative url of the api
- Raises:
MExError if Blue Ant API returns an error in the response body –
- Returns:
Parsed JSON body of the response
- _set_authentication() None ¶
Authenticate to the host.
- _set_url() None ¶
Set url of the host.
- get_client_name(client_id: int) str ¶
Get client name for client id.
- Parameters:
client_id – int: id of the client
- Returns:
name of the client
- Return type:
str
- get_department_name(department_id: int) str ¶
Get name for department id.
- Parameters:
department_id – int: id of the department
- Returns:
name of the department
- Return type:
str
- get_persons() list[BlueAntPerson] ¶
Get map of Blue Ant person IDs to employee IDs.
- get_projects() Generator[BlueAntProject, None, None] ¶
Load Blue Ant sources by querying the Blue Ant API projects endpoint.
- Returns:
Generator for Blue Ant projects
- get_status_name(status_id: int) str ¶
Get name for status id.
- Parameters:
status_id – int: id of the status
- Returns:
name of the status
- Return type:
str
- get_type_description(type_id: int) str ¶
Get description for type id.
- Parameters:
type_id – int: id of the type
- Returns:
description of the type
- Return type:
str
mex.blueant.extract module¶
mex.blueant.filter module¶
mex.blueant.main module¶
mex.blueant.settings module¶
- class mex.blueant.settings.BlueAntSettings(*, api_key: SecretStr = SecretStr('**********'), url: str = 'https://blueant', skip_labels: list[str] = ['test'], delete_prefixes: list[str] = ['_', '1_', '2_', '3_', '4_', '5_', '6_', '7_', '8_', '9_'])¶
Bases:
BaseModel
Blue Ant settings submodel definition for the Blue Ant extractor.
- api_key: SecretStr¶
- delete_prefixes: list[str]¶
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_max_length': 100000, 'str_min_length': 1, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_default': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'api_key': FieldInfo(annotation=SecretStr, required=False, default=SecretStr('**********'), description='Json Web Token for authentication with the Blue Ant API'), 'delete_prefixes': FieldInfo(annotation=list[str], required=False, default=['_', '1_', '2_', '3_', '4_', '5_', '6_', '7_', '8_', '9_'], description='Delete prefixes of labels starting with these terms'), 'skip_labels': FieldInfo(annotation=list[str], required=False, default=['test'], description='Skip projects with these terms in their label'), 'url': FieldInfo(annotation=str, required=False, default='https://blueant', description='URL of Blue Ant instance')}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- skip_labels: list[str]¶
- url: str¶