{ "info": { "author": "cassidymoen", "author_email": "cassidymoen@gmx.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "# Overview\n\n
z3rspoilerlib is a python library for analyzing spoiler logs produced by the A Link To The \nPast Randomizer (https://www.alttpr.com). It returns numbers in the form of integers or table-like\ndictionaries for further analysis and has some other helpful functions and variables. The current version is a\npre-release version subject to change at any time.
\n\n# Table of Contents\n\n1. [Getting Started](#getting-started)\n2. [SeedBulk Methods](#seedbulk-methods)\n3. [SeedSingle Class](#seedsingle-class)\n3. [SeedSingle Attributes](#seedsingle-attributes)\n4. [SeedSingle Methods](#seedsingle-methods)\n5. [Item Variables](#item-variables)\n6. [Location Variables](#location-variables)\n7. [Loading Individual Seeds](#loading-individual-seeds)\n8. [Todo](#todo)\n9. [v30.4 Spoiler Logs](#v304-spoiler-logs)\n\n# Getting Started\n\nThe recommended way to install is to use pip. You can use the command `pip install z3rspoilerlib` or \n`pip3 install z3rspoilerlib` depending on which version of pip you're using. To use it in a script, \nput `import z3rspoilerlib` at the top or use a shorthand like `import z3rspoilerlib as zsl`.\n\nOnce you've got it installed and imported, you can begin by creating an instance of the `SeedBulk` \nclass, which accepts a directory containing spoiler logs as an argument and prepares them to be used later. \nIt also accepts the game state(open, standard, or inverted) as a second argument with None as the \ndefault. For example you can use, `batch = zsl.SeedBulk('spoilers-304-norg', 'open')` to load a \ndirectory of open mode seeds named \"spoilers-304-norg.\" If you don't pass a directory, the program \nwill look in the current directory. It will try to load all .txt files, so make sure you only have \nspoiler logs in the directory you want it to load from.\n\n## SeedBulk Methods\n\nThe SeedBulk class has a few handy built in methods you can use to count items and locations which \nreturn integers and table-like dictionaries. Items and locations should be passed as they appear \nin the spoiler logs. If there are two different spellings for a region, use the spelling of the key \ncontaining multiple locations, not the spelling used in individual locations(e.g. use \"Dark Palace\", \nnot \"Palace of Darkness\".) In addition to the regions defined by the spoiler logs, there are some \ncustom regions included that can be used as well. These are listed below in the [SeedSingle Attributes](seedsingle-attributes) section.\n\n**count_item_in_loc(_item_, _loc_)**: Counts how many times `item` appears in `loc`(a specific item location, a region, or a custom region) in the batch. Returns an integer.\n\n**count_where(_item_)**: Returns a dictionary of location-number pairs counting how many times `item` appeared in a given location.\n\n**count_what(_loc_)**: Returns a dictionary of item-number pairs counting how many times that item appeared in `loc`. Must be one specific location, not a region.\n\n**count_where_if(_item_a_, _item_b_, _loc_b_)**: Returns a dictionary with location-number pairs that count \nwhere `item_a` appears given that `item_b` is in `loc_b`(specific location, region, or custom region). \nReturns `None` instead of an empty dictionary.\n\n**count_what_if(_loc_a_, _item_b_, _loc_b_)**: Returns a dictionary with item-number pairs that counts what items appear in `loc_a`(must be one specific location) given that `item_b` is in `loc_b`(specific location, region, or custom region). Returns None instead of an empty dictionary.\n\n# SeedSingle Class\n\nWhen SeedBulk loads the spoiler logs, it creates a SeedSingle object for each individual log. These objects have their own methods and attributes you can use. To iterate over these instead of using the built in methods, create an instance of the class and use a `for` loop like so: `for i in batch.load_seeds():`. `batch.load_seeds()` is a generator expression that loads these objects into memory one at a time designed such that it will use very little memory when working with large amounts of logs. Inside this loop you can use the SeedSingle methods and attributes. Additionally, SeedBulk has an attribute `spoiler_count` with the number of spoiler logs in the batch.\n\n## SeedSingle Attributes\n\n**seed_dict**: The seed's unaltered spoiler log as a dictionary.\n\n**world**: A dictionary containing information about the world with the following keys: \n\n* State: the game state\n* Crystals: a list of all crystal dungeons\n* Pendants: a list of all pendant dungeons\n* Red Crystals: crystals 5 & 6\n* Green Pendant: the green pendant dungeon \n* TR Medallion\n* MM Medallion\n\n**location_by_item**: A dictionary of unique items as keys and their location as values.\n\n**custom_region_dict**: A dictionary that is like the original log, but with custom regions. Current \ncustom regions are: \n\n* Kakariko: Items in Kakariko except locations gated by another item(Sick Kid, Magic Bat) and Race Game\n* South Shore: Dam to Ice Rod Cave\n* Zora Area: Waterfall chests, Zora Ledge, and Zora\n* Sahas Hut\n* Village Of Outcasts: Chest Game, Brewery, and C-Shaped House\n* TT First Four: The first four chests in Thieves' Town\n* Hookshot Cave\n* Superbunny Cave\n* North Dark World: Bumper Ledge and Graveyard Ledge\n* Smith Sequence: Smith Item and Purple Chest\n* Pyramid Fairy\n* Waterfall Fairy\n* Hype Cave\n* Mire Shed\n* TR Mimic Cave: All items in Turtle Rock plus the item in Mimic Cave\n* Sphere One Stanard\n\n## SeedSingle Methods\n\n**get_location_region_by_item()**: Returns a dictionary with unique items as keys and a tuple containing the location and region for that item as the value.\n\n**get_items_by_region(_region_)**: Returns a list of items in the given region. Does not include dungeon items.\n\n**make_flat_loc_dict()**: Returns a flattened version of the seed dictionary with specific locations as keys and items as values. There are no nested key-value pairs as there are in the original spoiler logs.\n\n## Loading Individual Seeds\n\nIf you only want to load one seed as a SeedSingle object you can use `zsl.load_single(id, game_state, seed_dir)` where \n`id` is the string at the end of the file name, `game_state` is the state(default is open), and the optional `seed_dir`\nargument takes a subdirectory that the seed is in. If `seed_dir` is not passed, the function will look in the current\ndirectory.\n\n## Item Variables\n\nThis library has an items submodule with some helpful variables:
\n\n* prog_items: A tuple containing all items in the game that can be required for progression.\n* nice_items: A tuple containing nice to have but never required (Half Magic and Silver Arrows.) \n* other_items: A tuple containing other unique items (Single Arrow and Bug Net.)\n* fetch_items: A tuple containing fetch quest items (Shovel, Mushroom, Powder.)\n* unique_items: A tuple containing the elements of the above tuples.\n* bottle_items: A tuple containing all possible bottle items.\n* small_keys: A tuple containing all small keys.\n* big_keys: A tuple containing all big keys.\n* compasses: A tuple containing all compasses.\n* maps: A tuple containing all maps.\n\n## Location Variables\n\nThe locations sub module has a tuple containing all 216 locations in the game, simply named `locations`.\n\n## Todo\n\n* Re-implement current functionality and future components as binary Rust extensions for speed. Python is rather slow \n here. Pre-building the heaviest parts in Rust to be distributed with the python wheel will allow it to be sped up while maintaining the relative simplicity of python syntax.\n* Add a module containing requirements for each location which can be used for package functions and in user scripts.\n* Write \"solvers\" for determining whether a seed is Agahnim-required or pedestal-required, maybe a generic solver\n interface that will allow users to model specific situations and return numbers/probabilities\n* Write a SeedBulk method or methods that can accept more generic conditionals as arguments than the current methods to\n simplify user scripts; they won't have to write as much custom code\n* Refactor plus additional support for keysanity, maybe glitched modes and other goals as well. Initial focus is on\n Normal, Standard/Open/Inverted, Defeat Ganon settings. \n\n## v30.4 Spoiler Logs\n\n* Normal Open Randomized Ganon http://www.mediafire.com/file/fy2kcn2483634m6/spoilers-304-norg.zip/file
\n* Normal Standard Randomized Ganon http://www.mediafire.com/file/ra7i1uc2acb655h/spoilers-304-nsrg-120318.zip/file
\n* Normal Standard Uncle Assured Ganon http://www.mediafire.com/file/8r112cgf59786c7/spoilers-304-nsug-130318.zip/file
\n\n\n\n",
"description_content_type": "text/markdown",
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/cassidoxa/z3rspoilerlib",
"keywords": "",
"license": "",
"maintainer": "",
"maintainer_email": "",
"name": "z3rspoilerlib",
"package_url": "https://pypi.org/project/z3rspoilerlib/",
"platform": "",
"project_url": "https://pypi.org/project/z3rspoilerlib/",
"project_urls": {
"Homepage": "https://github.com/cassidoxa/z3rspoilerlib"
},
"release_url": "https://pypi.org/project/z3rspoilerlib/0.1.2/",
"requires_dist": null,
"requires_python": "",
"summary": "A library for analyzing large batches of A Link to the Past Randomizer spoiler logs",
"version": "0.1.2"
},
"last_serial": 5121457,
"releases": {
"0.0.1": [
{
"comment_text": "",
"digests": {
"md5": "12e1ec5d8effd641b409e494c4de9a97",
"sha256": "68b40ba6e3c07cdc7643eed271fe02f8efaafe7dfc68e796c4bfae093133a20d"
},
"downloads": -1,
"filename": "z3rspoilerlib-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "12e1ec5d8effd641b409e494c4de9a97",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 15365,
"upload_time": "2019-03-21T05:25:12",
"url": "https://files.pythonhosted.org/packages/73/8f/93efbeaed4b2708e00f25ec1efaeae13fd0b1b4caa1a62fd0c67a02049b0/z3rspoilerlib-0.0.1-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "3394280a5e0118ed7945240190447270",
"sha256": "07341adb38704fe44fc8574b358670b1654b474c66f919b07bca6aee561f8498"
},
"downloads": -1,
"filename": "z3rspoilerlib-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "3394280a5e0118ed7945240190447270",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3173,
"upload_time": "2019-03-21T05:25:14",
"url": "https://files.pythonhosted.org/packages/90/58/50cad27e7081ff4d985a3c18aadb270a8d64ac4fd7a8974af570e846a60e/z3rspoilerlib-0.0.1.tar.gz"
}
],
"0.0.2": [
{
"comment_text": "",
"digests": {
"md5": "9509b8e067a41c6303157f6679e2c83b",
"sha256": "e2009b49aa1bfadf46f763a30c42a03a9876d38e0e54ce1fd1b06cd65a6b7409"
},
"downloads": -1,
"filename": "z3rspoilerlib-0.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9509b8e067a41c6303157f6679e2c83b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 19842,
"upload_time": "2019-03-21T06:16:43",
"url": "https://files.pythonhosted.org/packages/7a/77/33826e3f53163b812f308287419bd2c85df4470ba9e300febd02c59bc153/z3rspoilerlib-0.0.2-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "014896e8b2b7bb9d9efd28d4f1ec3d27",
"sha256": "fea97134b1192d200a47880bc9277cc8f3edc5a1979e3c7f11ed42d67a9821b8"
},
"downloads": -1,
"filename": "z3rspoilerlib-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "014896e8b2b7bb9d9efd28d4f1ec3d27",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7326,
"upload_time": "2019-03-21T06:16:45",
"url": "https://files.pythonhosted.org/packages/45/14/b48edf58984d1d55cbf03a1195d36b647f19a0564a6297206f054f8fe207/z3rspoilerlib-0.0.2.tar.gz"
}
],
"0.0.3": [
{
"comment_text": "",
"digests": {
"md5": "dbe177dca9cd31349ac97764fec1375d",
"sha256": "0791c70a3884b5891678638318c7316e35f780d5c65e042e8040f01aee4ede27"
},
"downloads": -1,
"filename": "z3rspoilerlib-0.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "dbe177dca9cd31349ac97764fec1375d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 21370,
"upload_time": "2019-03-27T17:24:17",
"url": "https://files.pythonhosted.org/packages/89/e8/440da4d3068885cdd0c7b5f938274bd26822e131d1e1ad74dd8914cafd24/z3rspoilerlib-0.0.3-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "c0dff4027318a2c21a7596ba5e46da7b",
"sha256": "fa051da18d62b19b77e0aff63bc848389f5b3605d4911801f452e6a7eec18764"
},
"downloads": -1,
"filename": "z3rspoilerlib-0.0.3.tar.gz",
"has_sig": false,
"md5_digest": "c0dff4027318a2c21a7596ba5e46da7b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 9469,
"upload_time": "2019-03-27T17:24:19",
"url": "https://files.pythonhosted.org/packages/1b/54/44efbd596ac0986c3da326052170be07f792c91257c89c74afcd91c7b528/z3rspoilerlib-0.0.3.tar.gz"
}
],
"0.1.0": [
{
"comment_text": "",
"digests": {
"md5": "9ff2ab108d09b45b938c68305d9151eb",
"sha256": "4d268568b9e077e1022ec8150f071bbe0bac4732b8e569ce8dbffe660e539b23"
},
"downloads": -1,
"filename": "z3rspoilerlib-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9ff2ab108d09b45b938c68305d9151eb",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 20576,
"upload_time": "2019-03-27T21:50:35",
"url": "https://files.pythonhosted.org/packages/4c/38/303415ae1be05c5d08179b879ad59c20b79920b402756fb6875efdd13af5/z3rspoilerlib-0.1.0-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "38bf34d9a8b7a5634d90efde399ec140",
"sha256": "bd9c231a1dcd644eb5b32588879f621b306b9f2c5059a0723a79f9b975055179"
},
"downloads": -1,
"filename": "z3rspoilerlib-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "38bf34d9a8b7a5634d90efde399ec140",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 9073,
"upload_time": "2019-03-27T21:50:38",
"url": "https://files.pythonhosted.org/packages/cc/13/f9539477f3544c77196969911ca3146fca43f98099cede4dd061282548f5/z3rspoilerlib-0.1.0.tar.gz"
}
],
"0.1.1": [
{
"comment_text": "",
"digests": {
"md5": "8b55c6ed5fe5401b4d4867e7926c6fbf",
"sha256": "effa46b0966fccf5f58d7d0f214ab5917505cfcd246d48c59f3c2ba53eb24518"
},
"downloads": -1,
"filename": "z3rspoilerlib-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8b55c6ed5fe5401b4d4867e7926c6fbf",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 23679,
"upload_time": "2019-04-05T16:57:19",
"url": "https://files.pythonhosted.org/packages/07/31/f3ac2828606078c46e84a0213f5c3b71c896336fa0fe7acf45ce511a27b6/z3rspoilerlib-0.1.1-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "37e6c83ff5598491af5f6565e1cd0b81",
"sha256": "c845a3239e6f3e5e17efe966398f785993878985910232028d9a46ebb3833479"
},
"downloads": -1,
"filename": "z3rspoilerlib-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "37e6c83ff5598491af5f6565e1cd0b81",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 14116,
"upload_time": "2019-04-05T16:57:22",
"url": "https://files.pythonhosted.org/packages/3f/fd/ed19672a7d07e57f5e0d3bfa92c3cb43a7577e6600d890b5be9acb4f810e/z3rspoilerlib-0.1.1.tar.gz"
}
],
"0.1.2": [
{
"comment_text": "",
"digests": {
"md5": "06470570b97b8aad335363ed994d7490",
"sha256": "86aa6767fab94a23f7f35c85abaeddaa1106d81e742690d879af7b3df0616f29"
},
"downloads": -1,
"filename": "z3rspoilerlib-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "06470570b97b8aad335363ed994d7490",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 23699,
"upload_time": "2019-04-10T00:21:50",
"url": "https://files.pythonhosted.org/packages/39/d2/d222f619e8e0623205f739a63726a8951e2af884ab7b5eff67b67af77333/z3rspoilerlib-0.1.2-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "3186e73b31c2791635ef8867a7290096",
"sha256": "99650151e7b3252fa44b9bf50429da4bc314f1077b82da86e2778bd32acae891"
},
"downloads": -1,
"filename": "z3rspoilerlib-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "3186e73b31c2791635ef8867a7290096",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 14123,
"upload_time": "2019-04-10T00:21:52",
"url": "https://files.pythonhosted.org/packages/14/86/bc7f2373a53683e0eefb207ddaae352941edee94ac0e68a3e075731be461/z3rspoilerlib-0.1.2.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "06470570b97b8aad335363ed994d7490",
"sha256": "86aa6767fab94a23f7f35c85abaeddaa1106d81e742690d879af7b3df0616f29"
},
"downloads": -1,
"filename": "z3rspoilerlib-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "06470570b97b8aad335363ed994d7490",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 23699,
"upload_time": "2019-04-10T00:21:50",
"url": "https://files.pythonhosted.org/packages/39/d2/d222f619e8e0623205f739a63726a8951e2af884ab7b5eff67b67af77333/z3rspoilerlib-0.1.2-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "3186e73b31c2791635ef8867a7290096",
"sha256": "99650151e7b3252fa44b9bf50429da4bc314f1077b82da86e2778bd32acae891"
},
"downloads": -1,
"filename": "z3rspoilerlib-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "3186e73b31c2791635ef8867a7290096",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 14123,
"upload_time": "2019-04-10T00:21:52",
"url": "https://files.pythonhosted.org/packages/14/86/bc7f2373a53683e0eefb207ddaae352941edee94ac0e68a3e075731be461/z3rspoilerlib-0.1.2.tar.gz"
}
]
}