dm_mac.neongetter module
Tool to update users.json from NeonOne API.
- class dm_mac.neongetter.NeonUserUpdater(dump_fields: bool = False)
Bases:
object
Class to update users.json from Neon One API.
- BASE_URL: str = 'https://api.neoncrm.com/v2/'
- MAX_PAGE_SIZE: int = 200
- _dump_fields() None
- _get_custom_fields_raw() List[Dict[str, Any]]
Return the raw API response for custom fields.
- _get_users_page(page: int, fields: List[str | int | List[str]], cutoff: str) Tuple[int, List[Dict[str, Any]]]
Get a specified page of the account search endpoint.
- _load_and_validate_config() Dict[str, str | List[str]]
Load and validate the config file.
- _mac_users_reload() None
If env var set, trigger users config reload.
- static example_config() Dict[str, str | List[str]]
Return an example configuration.
- fields_to_get() List[str | int | List[str]]
Return a list of custom field names to retrieve from Neon.
- get_users(fields: List[str | int | List[str]]) List[Dict[str, Any]]
Pull users from NeonCRM.
- run(output_path: str) None
Run the update.
- static validate_config(config: Dict[str, Any]) None
Validate configuration via jsonschema.
- dm_mac.neongetter.main() None
Main entrypoint for CLI script.
- dm_mac.neongetter.parse_args(argv: List[str]) Namespace
Parse command line arguments.