Skip to main content

EFSPIntegration.py_efsp_client

The base python client used to communicate with the E-file proxy server.

Doesn't include anything from docassemble, and can be used without having it installed.

CORR_ID_HEADER

TODO(brycew): Figure out how to add

LoggerWithContext Objects

class LoggerWithContext(LoggerAdapter)

Acts like the merge_extra feature from LoggerAdapter (python 3.13) is always on.

See https://github.com/python/cpython/pull/107292/files.

EfspConnection Objects

class EfspConnection()

A python client that communicates with the E-file proxy server.

__init__

def __init__(*,
url: str,
api_key: str,
default_jurisdiction: str = None,
logger=None)

Arguments

url (str) api_key (str) default_jurisdiction (str)

authenticate_user

def authenticate_user(*,
tyler_email: Optional[str] = None,
tyler_password: Optional[str] = None,
jeffnet_key: Optional[str] = None,
jurisdiction: str = None) -> ApiResponse

Authenticates the user with the EFM server (not the E-file proxy).

register_user

def register_user(person: dict,
registration_type: str,
*,
password: str = None,
firm_name_or_id: str = None) -> ApiResponse

registration_type needs to be INDIVIDUAL, FIRM_ADMINISTRATOR, or FIRM_ADMIN_NEW_MEMBER. If registration_type is INDIVIDUAL or FIRM_ADMINISTRATOR, you need a password. If it's FIRM_ADMINISTRATOR or FIRM_ADMIN_NEW_MEMBER, you need a firm_name_or_id

get_password_rules

def get_password_rules() -> ApiResponse

Password rules are stored in the global court, id 0.

TODO: They're in other courts too, including 1. Could they ever be different?

get_notification_options

def get_notification_options() -> ApiResponse

AKA NotificationPreferencesList

get_firm

def get_firm() -> ApiResponse

Gets info about the "firm" for an associated user. If a user is a pro-se, this contains their address information.

update_firm

def update_firm(firm: dict) -> ApiResponse

firm should have the below keys:

  • firstName, middleName, lastName if it's a person
  • firmName if it's a business
  • address (a dict), with keys addressLine1 addressLine2, city, state, zipCode, country
  • phoneNumber
  • email

get_courts

def get_courts(fileable_only: bool = False,
with_names: bool = False) -> ApiResponse

Gets the list of courts.

get_court

def get_court(court_id: str) -> ApiResponse

Gets codes for a specific court

get_court_list

def get_court_list() -> ApiResponse

Gets a list of all of the courts that you can file into. Slightly more limited than get_courts

get_filing_list

def get_filing_list(court_id: str,
user_id: str = None,
start_date: datetime = None,
before_date: datetime = None) -> ApiResponse

Returns a list of filings that a particular user has made with a court.

get_service_types

def get_service_types(court_id: str, all_vars: dict = None) -> ApiResponse

Checks the court info: if it has conditional service types, call a special API with all filing info so far to get service types

get_cases_raw

def get_cases_raw(court_id: str,
*,
person_name: dict = None,
business_name: str = None,
docket_number: str = None) -> ApiResponse

Finds existing cases at a particular court. Only one of person_name, business_name, or docket_number should be provided at a time. Params: court_id (str) person_name (dict) business_name (str) docket_number (str)