Reference

pricer.sources

Responsible for reading and cleaning input data sources.

pricer.sources.clean_arkinventory_data(run_dt)

Reads Ark Inventory json and parses into tabular format.

Return type

None

pricer.sources.clean_auctioneer_data()

Cleans Auctioneer json data into tablular format.

Return type

None

pricer.sources.clean_bb_data()

Parses all Booty Bay item json into tabular formats.

Return type

None

pricer.sources.clean_beancounter_data()

Reads Beancounter json and parses into tabular format.

Return type

None

pricer.sources.clean_beancounter_posted(df)

Further processing of posted auction beancounter data.

Return type

DataFrame

pricer.sources.clean_item_skeleton()

Creates basic dataframe from user items information.

Return type

None

pricer.sources.get_arkinventory_data()

Reads WoW Addon Ark Inventory lua data and saves local copy as json.

Return type

None

pricer.sources.get_auctioneer_data()

Reads WoW Addon Auctioneer lua and parses text file into json.

Return type

None

pricer.sources.get_bb_data()

Reads Booty Bay web API data using selenium and blizzard login.

Return type

None

pricer.sources.get_bb_item_page(driver, item_id)

Get Booty Bay json info for a given item_id.

Return type

Dict[Any, Any]

pricer.sources.get_beancounter_data()

Reads WoW Addon Beancounter lua and saves to local json.

Return type

None

pricer.sources.start_driver()

Spin up selenium driver for Booty Bay scraping.

Return type

<module ‘selenium.webdriver’ from ‘/home/docs/checkouts/readthedocs.org/user_builds/pricer/envs/latest/lib/python3.7/site-packages/selenium/webdriver/__init__.py’>

pricer.sources.update_items()

Check current inventory for items not included in master table.

Return type

None

pricer.analysis

Analyses cleaned data sources to form intermediate tables.

pricer.analysis.analyse_listings()

Convert live listings into single items.

Return type

None

pricer.analysis.analyse_material_cost()

Analyse cost of materials for items, using purchase history or BB predicted price.

Return type

None

pricer.analysis.analyse_replenishment()

Determine the demand for item replenishment.

Return type

None

pricer.analysis.analyse_rolling_buyout()

Builds rolling average of user’s auction purchases using beancounter data.

Return type

None

pricer.analysis.calculate_inventory_valuation()

Get total inventory value based on current market price.

Return type

None

pricer.analysis.create_item_inventory()

Convert Arkinventory tabular data into dataframe of counts for user items.

Return type

None

pricer.analysis.merge_item_table()

Combine item information into single master table.

Return type

None

pricer.analysis.predict_item_prices()

Analyse exponential average mean and std of items given 14 day, 2 hour history.

Return type

None

pricer.analysis.predict_volume_sell_probability(dur_char='m')

Expected volume changes as a probability of sale given BB recent history.

Return type

None

pricer.analysis.report_profits()

Compare purchases and sales to expected value to derive profit from action.

Return type

None

pricer.campaign

Collates information to form buy/sell campaigns.

pricer.campaign.analyse_buy_policy(MAX_BUY_STD=2)

Create buy policy.

Return type

None

pricer.campaign.analyse_make_policy()

Prints what potions to make.

Return type

None

pricer.campaign.analyse_sell_policy(stack=1, max_sell=10, duration='m', MAX_STD=5, MIN_PROFIT=300, MIN_PROFIT_PCT=0.015)

Creates sell policy based on information.

Return type

None

pricer.campaign.encode_buy_campaign(buy_policy)

Encodes buy campaign dataframe into dictionary.

Return type

Dict[str, Dict[str, Any]]

pricer.campaign.encode_make_policy(make_policy)

Encodes make campaign dataframe into dictionary.

Return type

Tuple[Dict[str, int], Dict[int, str]]

pricer.campaign.encode_sell_campaign(sell_policy)

Encode sell policy dataframe into dictionary.

Return type

Dict[str, Any]

pricer.campaign.write_buy_policy()

Writes the buy policy to all accounts.

Return type

None

pricer.campaign.write_make_policy()

Writes the make policy to all accounts.

Return type

None

pricer.campaign.write_sell_policy()

Writes the sell policy to accounts.

Return type

None

pricer.reporting

Produces reporting to help interpret analysis and campaigns.

pricer.reporting.draw_profit_charts()

Create charts of alltime and individual item profits.

Return type

None

pricer.reporting.grand_total()

Returns total inventory and money value.

Return type

Dict[str, int]

pricer.reporting.have_in_bag()

Prints expected profits, make sure its in your bag.

Return type

str

pricer.reporting.inventory_valuation()

Profits per item as HTML.

Return type

str

pricer.reporting.make_missing()

Prints details of items unable to be made.

Return type

str

pricer.reporting.produce_activity_tracking()

Produce chart of item prices, sold and bought for.

Return type

None

pricer.reporting.produce_item_reporting()

Collate item information and prepare feasibility chart.

Return type

None

pricer.reporting.produce_listing_items()

Generte the item listing on current AH.

Return type

None

pricer.reporting.profit_per_item()

Profits per item as HTML.

Return type

str

pricer.utils

Contains helper functions to support data pipeline.

pricer.utils.dict_to_lua(data)

Converts python dict into long str.

Return type

str

pricer.utils.dump_lua(data)

Borrowed code to write python dict as lua format(ish).

Return type

Any

pricer.utils.duration_str_to_mins(dur_char='m')

Convert duration string to auction minutes.

Return type

int

pricer.utils.enumerate_quantities(df, cols=None, qty_col='quantity')

Creates new dataframe to convert x,count to x*count.

Return type

DataFrame

pricer.utils.find_tsm_marker(content, initial_key)

Search binary lua for an attribute start and end location.

Return type

Tuple[int, int]

pricer.utils.get_ahm()

Get the auction house main details.

Return type

Dict[str, str]

pricer.utils.get_bb_fields(result, field)

Booty bay data contains some strange nesting, retrieves data.

Return type

Dict[Any, Any]

pricer.utils.get_seconds_played(time_played)

Convert string representation of time played to seconds.

Return type

int

pricer.utils.list_flatten(t)

Simple list flatten.

Return type

List[Any]

pricer.utils.make_lua_path(account_name='', datasource='')

Forms a path to a lua file.

Return type

Path

pricer.utils.source_merge(a, b, path=None)

Merges b into a.

Return type

Dict[Any, Any]

pricer.utils.user_item_filter(field)

Returns user items filtered by a field.

Return type

List[str]

pricer.io

File read and writes.

pricer.io.reader(folder='', name='', ftype='', custom='', self_schema=False)

Standard program writer, allows pathing extensibility i.e. testing or S3.

Return type

Any

pricer.io.writer(data, folder='', name='', ftype='', custom='', self_schema=False)

Standard program writer, allows pathing extensibility i.e. testing or S3.

Return type

None

pricer.schema

Schema enforcement for project.

pricer.config

It collates and loads user specified configuration for data pipeline.

pricer.config.get_item_ids()

Read item id database.

Return type

Dict[str, int]

pricer.config.get_item_ids_fixed()

Read item id database.

Return type

Dict[int, str]

pricer.config.get_servers()

Get server_ids and info from booty bay.

Return type

Dict[str, Dict[str, Union[int, str]]]

pricer.config.get_wow_config(pricer_path)

Gets the pricer config file.

Return type

Dict[str, Any]

pricer.run

Main entry point for pricer program.

First time running checklist - Set up TSM groups - Run booty bay - Get icons

pricer.run.main()

Main program runner.

Return type

None

pricer.run.run_analytics(stack=5, max_sell=20, duration='m')

Run the main analytics pipeline.

Return type

None

pricer.run.run_reporting()

Run steps to create plots and insights.

Return type

None

pricer.run.run_update_items()

Check current inventory for items not included in master table.

Return type

None