; Sample ayugespidertools config file.
;
; For more information on the config file, please see:
; https://ayugespidertools.readthedocs.io/en/latest/topics/configuration.html
;
; Notes:
;  - In the configuration examples, there are default values. If they match your
;    requirements, you can leave the comments unchanged or remove them. The same
;    applies to optional parameters with empty values.
;  - For configuration details and parameter explanations, please refer to the
;    document located at `topics/configuration.html`.
;  - If you're not quite sure about how to use certain configurations, please
;    refer to the corresponding examples in `DemoSpider`.
;  - If you have any suggestions for optimization regarding this section or the
;    configuration document, please feel free to raise an issue for feedback.

; Nacos configuration:
;  If you are managing many projects, you can choose this service, or the
;  following Consul service. If both are configured, configuration will be
;  prioritized from Consul. This section of configuration needs to be used in
;  conjunction with `APP_CONF_MANAGE`. Configuration retrieval from the remote
;  configuration service will only occur when `APP_CONF_MANAGE` is set to True.
;  If you need to configure a token, please build it into the url. The `format`
;  specifies the format of the configuration content in Nacos, supporting JSON,
;  XML and YAML parsing.

;[nacos]
;url=http://host:port/nacos/v1/cs/configs?dataId=*&group=*&tenant=*
;format=json

; Consul configuration:
;  Similarly, when using this, you need to configure APP_CONF_MANAGE to True in
;  the project. `token` is an optional parameter representing the Consul ACLs
;  token. The `format` specifies the format of the configuration content in
;  Consul, supporting JSON, HCL, YAML and XML parsing.

;[consul]
;url=http://host:port/v1/kv/...?dc=dc1&raw
;token=
;format=json

; Mysql configuration:
;  `engine`, `charset`, `collate` are parameters required when automatically
;  creating databases and tables. Note that charset and collate should
;  correspond appropriately. `odku_enable` controls whether to enable the `ON
;  DUPLICATE KEY UPDATE` feature, with a default value of false.

;[mysql]
;user=
;password=
;database=
;host=localhost
;port=3306
;engine=InnoDB
;charset=utf8mb4
;collate=utf8mb4_general_ci
;odku_enable=false

; MongoDB configuration:
;  You can choose either [mongodb:uri] or [mongodb] based on your needs. If both
;  are configured, the configuration will be retrieved from [mongodb:uri] as a
;  priority.

;[mongodb:uri]
;uri=mongodb://user:password@host:port/database?authSource=*&authMechanism=*

;[mongodb]
;database=
;user=
;password=
;host=localhost
;port=27017
;authsource=admin
;authMechanism=SCRAM-SHA-1

; PostgreSQL configuration:
;  `charset` is a parameter required when automatically creating databases and
;  tables.

;[postgresql]
;user=
;password=
;database=
;host=localhost
;port=5432
;charset=UTF8

; ElasticSearch configuration:
;  The relevant parameters for TLS certificate identity validation are:
;  ca_certs, client_certs, client_key, and ssl_assert_fingerprint. If
;  certificate verification is not needed, simply set `verify_certs` to false.
;  If there are multiple hosts for the parameter `hosts`, separate them with
;  commas, for example: https://x.x.x.x:9200,https://x.x.x.x:9201
;  `index_class` defines the Elasticsearch Index class and allows configuration
;  of all properties except name. For specific details, please refer to the
;  elasticsearch-dsl documentation. If name is configured within `index_class`,
;  it will be overridden by the `_table` parameter value in AyuItem. `init`
;  determines whether to create an Elasticsearch index. This setting is
;  typically enabled only during the first run of the project. Alternatively,
;  you can manually create the index and set this parameter to false
;  permanently.

;[elasticsearch]
;hosts=https://127.0.0.1:9200
;index_class={"settings":{"number_of_shards": 2}}
;user=elastic
;password=elastic
;init=false
;verify_certs=false
;ca_certs=/path/to/CA_certs
;client_cert=/path/to/clientcert.pem
;client_key=/path/to/clientkey.pem
;ssl_assert_fingerprint =

; RabbitMQ configuration:
;  Each parameter corresponds directly to parameters in the pika library. For
;  detailed parameter explanations, please refer to the documentation of the
;  pika library.

;[mq]
;virtualhost=
;queue=
;exchange=
;routing_key=
;username=guest
;password=guest
;host=localhost
;port=5672

; Oracle configuration:
;  `thick_lib_dir` is the configuration for oracledb thick_mode, an optional
;  parameter that can be of type bool or str, with a default value of false.

;[oracle]
;user=
;password=
;service_name=
;host=localhost
;port=1521
;encoding=utf8
;thick_lib_dir=false

; Kafka configuration:
;  If there are multiple `bootstrap_servers`, separate them with commas. For
;  example: x.x.x.x:9092,x.x.x.x:9093

;[kafka]
;bootstrap_servers=127.0.0.1:9092
;topic=
;key=

; kuaidaili dynamic proxy configuration:
;  `proxy` is the tunnel proxy service address. `username` and `password` are
;  the account credentials for the current service.

;[kdl_dynamic_proxy]
;proxy=o668.kdltps.com:15818
;username=
;password=

; kuaidaili dedicated proxy configuration:
;  This configuration differs from dynamic proxy by including an additional
;  `index` setting, which indicates the proxy corresponding to its index value.
;  The `proxy` parameter represents the API of the dedicated proxy service.

;[kdl_exclusive_proxy]
;proxy=http://kps.kdlapi.com/api/getkps?orderid=*&num=100&format=json
;username=
;password=
;index=1

; Oss configuration:
;  `access_key` refers to the ali(oss2) access_key_id. `access_secret` refers to
;  the ali access_key_secret. The parameters `endpoint` and `bucket` should
;  match those used in the oss2 library. `doc` refers to the directory or folder
;  that needs to be operated on, for example, file/img. This parameter is optional.
;  `upload_fields_suffix` specifies the suffix used to identify fields that
;  should be uploaded to OSS. If a field in AyuItem contains this suffix, the
;  corresponding network stream will be uploaded to OSS. The default suffix is
;  `_file_url`. "oss_fields_prefix" specifies the prefix used to create new
;  AyuItem field names corresponding to fields uploaded to OSS. The new field
;  will be the original field name with this prefix added. The default prefix is
;  `_`. `full_link_enable` determines whether to save the full OSS file link.
;  The default value is false.

;[oss:ali]
;access_key=
;access_secret=
;endpoint=
;bucket=
;doc=
;upload_fields_suffix=_file_url
;oss_fields_prefix=_
;full_link_enable=false

; Custom configuration:
;  you can create a custom section here to securely store private or project-specific
;  settings. This configuration can be combined with the `get_cfg` parsing method
;  to load custom values. for example:
;  ```
;  from ayugespidertools.config import get_cfg
;
;  _my_cfg = get_cfg()
;  custom_option = _my_cfg["custom_section"].get("custom_option", "no_custom_value")
;  custom_int = _my_cfg["custom_section"].getint("custom_int", 0)
;  custom_bool = _my_cfg["custom_section"].getboolean("custom_bool", False)
;  custom_float = _my_cfg["custom_section"].getfloat("custom_float", 3.14)
;  ```
;  See `topics/configuration` for a complete example.

;[custom_section]
;custom_option=custom_value
;custom_int=1
;custom_bool=true
;custom_float=3.1415926
