{"id":22452014,"url":"https://github.com/woctezuma/steampi","last_synced_at":"2025-08-02T00:32:35.680Z","repository":{"id":57471340,"uuid":"134313551","full_name":"woctezuma/steampi","owner":"woctezuma","description":"SteamPI: a simple API for Steam. Available on PyPI.","archived":false,"fork":false,"pushed_at":"2024-11-14T18:44:08.000Z","size":66,"stargazers_count":9,"open_issues_count":5,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-28T08:16:15.997Z","etag":null,"topics":["steam","steam-api","steamspy"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/steampi/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/woctezuma.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-21T19:09:28.000Z","updated_at":"2024-08-08T18:36:10.000Z","dependencies_parsed_at":"2023-11-06T13:42:34.792Z","dependency_job_id":"13df3216-9167-4e07-a024-930549277e76","html_url":"https://github.com/woctezuma/steampi","commit_stats":{"total_commits":74,"total_committers":2,"mean_commits":37.0,"dds":0.1216216216216216,"last_synced_commit":"3a2aaf60fe1f0ccf65f10bff82552c0377dedf6f"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woctezuma%2Fsteampi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woctezuma%2Fsteampi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woctezuma%2Fsteampi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woctezuma%2Fsteampi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/woctezuma","download_url":"https://codeload.github.com/woctezuma/steampi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228419603,"owners_count":17916772,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["steam","steam-api","steamspy"],"created_at":"2024-12-06T06:09:33.036Z","updated_at":"2024-12-06T06:09:33.740Z","avatar_url":"https://github.com/woctezuma.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SteamPI: a simple API for Steam\n\n[![PyPI status][pypi-image]][pypi]\n[![Build status][build-image]][build]\n[![Code coverage][codecov-image]][codecov]\n[![Code Quality][codacy-image]][codacy]\n\nThis repository contains Python code to download some data through Steam API.\n\n## Installation\n\nThe code is packaged for [PyPI](https://pypi.org/project/steampi/), so that the installation consists in running:\n\n```bash\npip install steampi\n```\n\n## Usage\n\n### Download app details of a Steam game, given its appID\n\n```python\nimport steampi.api\n\napp_id = '440'\n(app_details, is_success, status_code) = steampi.api.load_app_details(app_id)\n```\n\n### Retrieve the release date of a Steam game, given its appID\n\n```python\nimport steampi.calendar\n\napp_id = '440'\nrelease_date = steampi.calendar.get_release_date_as_datetime(app_id)\n```\n\n### Retrieve the release year of a Steam game, given its appID\n\n```python\nimport steampi.calendar\n\napp_id = '440'\nrelease_year = steampi.calendar.get_release_year(app_id)\n```\n\n### Find the most similar game names to an input text\n\n#### Using the Levenshtein distance\n\nThe Levenshtein distance is an edit distance, which is useful to fix typos for instance.\n\n```python\nimport steampi.text_distances\nimport steamspypi\n\nsteamspy_database = steamspypi.load()\n\ninput_text = 'Crash Bandicoot'\nsorted_app_ids, text_distances = steampi.text_distances.find_most_similar_game_names(input_text,\n                                                                                     steamspy_database)\n\nnum_games_to_print = 5\nfor i in range(num_games_to_print):\n    similar_game_name = steamspy_database[sorted_app_ids[i]]\n    print(similar_game_name)\n```\n\n#### Using the longest contiguous matching subsequence\n\nThe code snippet below makes use of the longest contiguous matching subsequence.\nThis leads to different results compared to Levenshtein distance, which you might find more suitable for your needs.\n\nHowever:\n-   the code is slower than with Levenshtein distance: for instance, the run-time is 140% longer for the unit test,\n-   the text distances are bound to [0,1], so they do not have the same value range as for Levenshtein distance,\n-   the text distances do not have the same meaning as for Levenshtein distance, which was the minimal number of edits,\n-   the results do not contain all the text distances, but only these with less than 0.4 distance (i.e. 0.6 similarity).\n\nJunk characters can be specified with `junk_str`.\n\n```python\nimport steampi.text_distances\nimport steamspypi\n\nsteamspy_database = steamspypi.load()\n\nnum_games_to_print = 5\njunk_str=''\n\ninput_text = 'Crash Bandicoot'\nsorted_app_ids, text_distances = steampi.text_distances.find_most_similar_game_names(input_text,\n                                                                                     steamspy_database,\n                                                                                     use_levenshtein_distance=False,\n                                                                                     n=num_games_to_print,\n                                                                                     junk_str=junk_str,\n                                                                                     )\n\nfor i in range(len(sorted_app_ids)):\n    similar_game_name = steamspy_database[sorted_app_ids[i]]\n    print(similar_game_name)\n```\n\n## References\n\n-   [Levenshtein module](https://github.com/ztane/python-Levenshtein) for the Levenshtein distance,\n-   [Difflib module](https://docs.python.org/3/library/difflib.html) for the longest contiguous matching subsequence.\n\n\u003c!-- Definitions for badges --\u003e\n\n[pypi]: \u003chttps://pypi.python.org/pypi/steampi\u003e\n[pypi-image]: \u003chttps://badge.fury.io/py/steampi.svg\u003e\n\n[build]: \u003chttps://github.com/woctezuma/steampi/actions\u003e\n[build-image]: \u003chttps://github.com/woctezuma/steampi/workflows/Python package/badge.svg?branch=master\u003e\n[publish-image]: \u003chttps://github.com/woctezuma/steampi/workflows/Upload Python Package/badge.svg?branch=master\u003e\n\n[pyup]: \u003chttps://pyup.io/repos/github/woctezuma/steampi/\u003e\n[dependency-image]: \u003chttps://pyup.io/repos/github/woctezuma/steampi/shield.svg\u003e\n[python3-image]: \u003chttps://pyup.io/repos/github/woctezuma/steampi/python-3-shield.svg\u003e\n\n[codecov]: \u003chttps://codecov.io/gh/woctezuma/steampi\u003e\n[codecov-image]: \u003chttps://codecov.io/gh/woctezuma/steampi/branch/master/graph/badge.svg\u003e\n\n[codacy]: \u003chttps://www.codacy.com/app/woctezuma/steampi\u003e\n[codacy-image]: \u003chttps://api.codacy.com/project/badge/Grade/b7c2295b2f69449dad7b553b2295c844\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwoctezuma%2Fsteampi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwoctezuma%2Fsteampi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwoctezuma%2Fsteampi/lists"}