armatis package¶
Subpackages¶
Submodules¶
armatis.models module¶
-
class
armatis.models.
Parcel
(sender=None, receiver=None, invoice_number=None, address=None, note=None)[source]¶ Bases:
object
armatis.parser module¶
-
class
armatis.parser.
Parser
(invoice_number, config)[source]¶ Bases:
object
-
add_track
(new_track)[source]¶ Add the tracking status information
Parameters: new_track (Track) – The tracking status information
-
invoice_number
¶
-
parcel
¶
-
parse
(parser)[source]¶ Parse the response of the API request
Parameters: parser – The module for parsing the response
-
parser
(doc)[source]¶ The module for parsing the response of the API request
Parameters: doc (str) – The response of the API request Returns: The module for parsing the response
-
requests
¶
-
-
class
armatis.parser.
ParserRequest
(url=None, method=None, body=None, header=None)[source]¶ Bases:
object
-
class
armatis.parser.
RequestManager
(user_agent)[source]¶ Bases:
object
Provide the additional HTTP request information for browsing the API
Module contents¶
Armatis
Armatis parses the website or web API response of Korean parcel delivery service company for tracking the parcel.
https://github.com/iBluemind/armatis
-
class
armatis.
Armatis
(company_code=None, invoice_number=None, config=None)[source]¶ Bases:
object
-
default_config
= {'INVOICE_NUMBER_VALIDATION': False, 'MULTIPLE_REQUEST_PERIOD': 2, 'USER_AGENT_STRING': 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)'}¶
-
find
(company_code=None, invoice_number=None)[source]¶ Track the parcel
Parameters: - company_code (str) – The company’s code to find the parcel
- invoice_number (int) – The invoice number to find the parcel
Returns: The result of the tracking parcel
Return type: dict
-
last_result
()[source]¶ Return the most recent tracking result
Returns: The most recent tracking result Return type: dict
-