Configuration
Index
Constructors
Methods
Constructors
__init__
{"content": ["Create a
Configurationinstance.\n\nAll the parameters are loaded by default from environment variables when running on the Apify platform.\nYou can override them here in the Configuration constructor, which might be useful for local testing of your actors.\n\nArgs:\n api_base_url (str, optional): The URL of the Apify API.\n This is the URL actually used for connecting to the API, so it can contain an IP address when running in a container on the platform.\n api_public_base_url (str, optional): The public URL of the Apify API.\n This will always contain the public URL of the API, even when running in a container on the platform.\n Useful for generating shareable URLs to key-value store records or datasets.\n container_port (int, optional): The port on which the container can listen for HTTP requests.\n container_url (str, optional): The URL on which the container can listen for HTTP requests.\n default_dataset_id (str, optional): The ID of the default dataset for the actor.\n default_key_value_store_id (str, optional): The ID of the default key-value store for the actor.\n default_request_queue_id (str, optional): The ID of the default request queue for the actor.\n input_key (str, optional): The key of the input record in the actor's default key-value store\n max_used_cpu_ratio (float, optional): The CPU usage above which the SYSTEM_INFO event will report the CPU is overloaded.\n metamorph_after_sleep_millis (int, optional): How long should the actor sleep after calling metamorph.\n persist_state_interval_millis (int, optional): How often should the actor emit the PERSIST_STATE event.\n persist_storage (bool, optional): Whether the actor should persist its used storages to the filesystem when running locally.\n proxy_hostname (str, optional): The hostname of Apify Proxy.\n proxy_password (str, optional): The password for Apify Proxy.\n proxy_port (str, optional): The port of Apify Proxy.\n proxy_status_url (str, optional): The URL on which the Apify Proxy status page is available.\n purge_on_start (str, optional): Whether the actor should purge its default storages on startup, when running locally.\n token (str, optional): The API token for the Apify API this actor should use.\n system_info_interval_millis (str, optional): How often should the actor emit the SYSTEM_INFO event when running locally."]}Parameters
keyword-onlyapi_base_url: Optional[str] = None
keyword-onlyapi_public_base_url: Optional[str] = None
keyword-onlycontainer_port: Optional[int] = None
keyword-onlycontainer_url: Optional[str] = None
keyword-onlydefault_dataset_id: Optional[str] = None
keyword-onlydefault_key_value_store_id: Optional[str] = None
keyword-onlydefault_request_queue_id: Optional[str] = None
keyword-onlyinput_key: Optional[str] = None
keyword-onlymax_used_cpu_ratio: Optional[float] = None
keyword-onlymetamorph_after_sleep_millis: Optional[int] = None
keyword-onlypersist_state_interval_millis: Optional[int] = None
keyword-onlypersist_storage: Optional[bool] = None
keyword-onlyproxy_hostname: Optional[str] = None
keyword-onlyproxy_password: Optional[str] = None
keyword-onlyproxy_port: Optional[int] = None
keyword-onlyproxy_status_url: Optional[str] = None
keyword-onlypurge_on_start: Optional[bool] = None
keyword-onlytoken: Optional[str] = None
keyword-onlysystem_info_interval_millis: Optional[int] = None
Returns None
Methods
get_global_configuration
{"content": ["Retrieve the global configuration.\n\nThe global configuration applies when you call actor methods via their static versions, e.g.
Actor.init().\nAlso accessible viaActor.config."]}Returns 'Configuration'
{"content": ["A class for specifying the configuration of an actor.\n\nCan be used either globally via
Configuration.get_global_configuration(),\nor it can be specific to eachActorinstance on theactor.configproperty."]}