Module Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias Expr Str FunctionDef arguments args defaults body Assign NameStore ListLoad Print Str With Call NameLoad Str Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr orelse If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr orelse If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Str If NameLoad body Assign NameStore Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad keyword Str keyword Str keyword ListLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword SubscriptLoad NameLoad Index Num keyword SubscriptLoad NameLoad Index Num keyword SubscriptLoad NameLoad Index Num keyword SubscriptLoad NameLoad Index Num keyword SubscriptLoad NameLoad Index Num keyword SubscriptLoad NameLoad Index Num keyword SubscriptLoad NameLoad Index Num If UnaryOpNot SubscriptLoad NameLoad Index Num body Raise Call NameLoad Str If CompareEq NameLoad Str body Assign NameStore Str orelse If CompareEq NameLoad Str body Assign NameStore Str orelse If CompareEq NameLoad Str body Assign NameStore Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword Dict Str Str Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Str body Expr Str If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr keyword ListLoad Str keyword ListLoad Str orelse If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr keyword ListLoad Str keyword ListLoad Str orelse Expr Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr keyword ListLoad Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Delete NameDel decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str keyword NameLoad keyword Str keyword Num Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str If UnaryOpNot AttributeLoad NameLoad attr body Raise Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad Assign NameStore BinOpMod Str NameLoad If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Str Assign NameStore Num For TupleStore NameStore NameStore Call NameLoad NameLoad body Print NameLoad NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore ListLoad Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore BinOpMod Str TupleLoad NameLoad Call NameLoad NameLoad If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Print Str Continue Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore SubscriptLoad NameLoad Index Num If CompareEq SubscriptLoad NameLoad Index Num Str body Assign NameStore NameLoad orelse If CompareEq SubscriptLoad NameLoad Index Num Str body Assign NameStore NameLoad If UnaryOpNot NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Print BinOpMod Str NameLoad Print BinOpMod Str TupleLoad NameLoad NameLoad Print BinOpMod Str NameLoad Expr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad Call AttributeLoad NameLoad attr Str Str NameLoad NameLoad NameLoad NameLoad AugAssignAdd NameStore Call NameLoad NameLoad Print BinOpMod Str NameLoad Print Str Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr decorator_list If CompareEq NameLoad Str body Expr Call NameLoad
N/A N/A settings N/A argparse N/A csv N/A easypost N/A os N/A requests N/A shutil N/A time slugify slugify N/A 
Program to take a CSV of book orders and use the EasyPost API to buy and create
labels for each order.

NOTE: There are custom values here for Hello Web App that should be overridden
if you're using this for your own items.
 import_csv N/A N/A N/A N/A N/A csv_rows N/A N/A Importing CSV. N/A N/A open orders.csv rb f N/A N/A reader N/A N/A csv reader f N/A row reader N/A N/A N/A N/A csv_rows append row N/A N/A N/A csv_rows pop 0 N/A csv_rows N/A setup_customs N/A N/A canada type N/A N/A N/A N/A type 1 N/A N/A customs_item1 N/A N/A N/A easypost CustomsItem create N/A settings HWA1_DESCRIPTION N/A N/A N/A type 2 N/A N/A customs_item1 N/A N/A N/A easypost CustomsItem create N/A settings HWA2_DESCRIPTION N/A N/A N/A type 12 N/A N/A customs_item1 N/A N/A N/A easypost CustomsItem create N/A settings DOUBLE_ITEM_DESCRIPTION N/A eel_pfc NOEEI 30.37(a) N/A canada N/A N/A eel_pfc NOEEI 30.36 N/A customs_info N/A N/A N/A easypost CustomsInfo create eel_pfc eel_pfc customs_certify True customs_signer Tracy Osborn contents_type merchandise customs_items N/A customs_item1 N/A customs_info N/A setup_shipment N/A N/A row from_address days_advance type customs N/A None N/A N/A to_address N/A N/A N/A easypost Address create name N/A row N/A 0 street1 N/A row N/A 1 street2 N/A row N/A 2 city N/A row N/A 3 state N/A row N/A 4 zip N/A row N/A 5 country N/A row N/A 6 N/A N/A N/A row N/A 7 N/A N/A N/A ValueError Missing package type. N/A N/A type 1 N/A N/A weight 10 N/A N/A N/A type 2 N/A N/A weight 13 N/A N/A N/A type 12 N/A N/A weight 21 N/A parcel N/A N/A N/A easypost Parcel create predefined_package Parcel weight weight N/A shipment N/A N/A N/A easypost Shipment create to_address to_address from_address from_address parcel parcel customs_info customs options N/A special_rates_eligibility date_advance USPS.MEDIAMAIL days_advance N/A shipment N/A buy_postage N/A N/A shipment speed N/A normal N/A N/A 
    Can choose from several different shipping rates:
    - normal (Media Mail for US, first for International)
    - premium (Priority for US, not offered for International)
    - urgent (Overnight for US, not offered for International)
     N/A N/A speed premium N/A N/A N/A N/A shipment buy rate N/A N/A shipment lowest_rate carriers N/A USPS services N/A Priority N/A N/A N/A speed urgent N/A N/A N/A N/A shipment buy rate N/A N/A shipment lowest_rate carriers N/A USPS services N/A Express N/A N/A N/A N/A shipment buy rate N/A N/A shipment lowest_rate carriers N/A USPS N/A shipment N/A export_postage N/A N/A label_url file_name N/A N/A N/A url label_url N/A response N/A N/A requests get url stream True N/A N/A open file_name wb out_file N/A N/A N/A N/A shutil copyfileobj N/A response raw out_file N/A response N/A main N/A N/A N/A N/A N/A parser N/A N/A argparse ArgumentParser description Create shipping labels from EasyPost.com. N/A N/A N/A parser add_argument --days dest days metavar N type int help Days from now that you want to ship the label(s). Default is today. default 0 N/A args N/A N/A parser parse_args N/A days_advance N/A args days N/A N/A easypost api_key N/A N/A os getenv EASYPOST_API_KEY N/A N/A N/A easypost api_key N/A N/A N/A ValueError Missing EASYPOST_API_KEY env var. N/A date N/A N/A time strftime %Y-%m-%d N/A from_address N/A N/A N/A easypost Address create N/A settings FROM_ADDRESS N/A csv_rows N/A import_csv N/A directory N/A labels/%s date N/A N/A N/A N/A N/A os path exists directory N/A N/A N/A N/A os makedirs directory N/A file N/A open N/A N/A N/A os path join directory log.csv a N/A total_cost 0 N/A N/A i row N/A enumerate csv_rows N/A N/A i row N/A domestic False N/A canada False N/A customs N/A N/A name N/A row N/A 0 N/A file_name N/A %s/img-%s.png N/A directory N/A slugify name N/A N/A N/A N/A os path isfile file_name N/A N/A Label exists! N/A N/A type N/A row N/A 7 N/A speed N/A row N/A 8 N/A N/A N/A row N/A 6 US N/A N/A domestic True N/A N/A N/A N/A row N/A 6 CA N/A N/A canada True N/A N/A domestic N/A N/A customs N/A setup_customs canada type N/A shipment N/A setup_shipment row from_address days_advance type customs N/A shipment N/A buy_postage shipment speed N/A label_url N/A N/A shipment N/A postage_label N/A label_url N/A selected_service N/A N/A shipment N/A selected_rate N/A service N/A selected_rate N/A N/A shipment N/A selected_rate N/A rate N/A tracking_code N/A N/A shipment N/A tracker N/A tracking_code N/A N/A Label URL: %s label_url N/A N/A Selected rate: USPS %s $%s N/A selected_service selected_rate N/A N/A Tracking code: %s tracking_code N/A N/A export_postage label_url file_name N/A N/A N/A file write N/A %s,%s,$%s,%s,%s
 N/A N/A N/A name decode ascii ignore tracking_code label_url selected_service selected_rate N/A total_cost N/A float selected_rate N/A N/A Total cost so far: $%s total_cost N/A ------ N/A N/A N/A file write N/A $%s total_cost N/A N/A N/A file close N/A N/A N/A __name__ __main__ N/A N/A N/A main