{"id":13741040,"url":"https://github.com/ymyke/tessa","last_synced_at":"2026-02-11T17:38:14.620Z","repository":{"id":39610211,"uuid":"479978318","full_name":"ymyke/tessa","owner":"ymyke","description":"tessa – simple, hassle-free access to price information of financial assets","archived":false,"fork":false,"pushed_at":"2026-01-16T12:07:40.000Z","size":6717,"stargazers_count":53,"open_issues_count":1,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-01-16T23:51:22.343Z","etag":null,"topics":["coingecko","finance","financial-analysis","financial-data","investing","investment-analysis","pycoingecko","python","yahoo","yfinance","yfinance-api","yfinance-library"],"latest_commit_sha":null,"homepage":"https://ymyke.github.io/tessa/tessa.html","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/ymyke.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,"zenodo":null}},"created_at":"2022-04-10T10:04:05.000Z","updated_at":"2026-01-16T12:07:44.000Z","dependencies_parsed_at":"2025-05-08T21:33:49.539Z","dependency_job_id":"29fc2cab-0b8d-48e1-8fad-9b5b2aa153d3","html_url":"https://github.com/ymyke/tessa","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/ymyke/tessa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ymyke%2Ftessa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ymyke%2Ftessa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ymyke%2Ftessa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ymyke%2Ftessa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ymyke","download_url":"https://codeload.github.com/ymyke/tessa/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ymyke%2Ftessa/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29339780,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T16:14:43.024Z","status":"ssl_error","status_checked_at":"2026-02-11T16:14:15.258Z","response_time":97,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["coingecko","finance","financial-analysis","financial-data","investing","investment-analysis","pycoingecko","python","yahoo","yfinance","yfinance-api","yfinance-library"],"created_at":"2024-08-03T04:00:54.799Z","updated_at":"2026-02-11T17:38:14.602Z","avatar_url":"https://github.com/ymyke.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":["Data Sources"],"readme":"\n# tessa – simple, hassle-free access to price information of financial assets\n\ntessa is a Python library to help you **easily retrieve price information** for assets\nfrom different sources such as Yahoo or Coingecko. It takes care of the different APIs,\ncaching, rate limiting, and other hassles.\n\ntessa provides a **Symbol class that encapsulates the methods relevant for a symbol**.\ntessa also provides functionality to **manage collections of symbols**, store and load\nthem, and extend their functionality.\n\nFinally, tessa makes sure to be nice to the sites being accessed and tries to **prevent\nusers from being blocked by 429 rate limiting errors** by 1) caching results upon\nretrieval and 2) keeping track of request timestamps and waiting appropriate amounts of\ntime if necessary. tessa also automatically waits and retries requests that fail with a\n5xx error.\n\n[→ Check out the full documentation. 📖](https://ymyke.github.io/tessa/tessa.html)\n\n\n## How to use\n\nHere's a longer example that shows all aspects of the library. Refer to\nsubmodules [symbol](tessa/symbol.html), [search](tessa/search.html), and\n[price](tessa/price.html) for more information.\n\n###### Imports:\n\n```python\nfrom tessa import Symbol, SymbolCollection, search\nimport pendulum\n```\n\n###### Create a symbol for MSFT and access some functions:\n\n```python\ns1 = Symbol(\"MSFT\")             # will use \"yahoo\" as the default source\ns1.price_latest()               # get latest price\n```\n\n###### Create another symbol from a bloomberg ticker as it is used by Yahoo Finance:\n\n```python\ns2 = Symbol(\"SREN.SW\")\ns2.price_point(\"2022-06-30\")    # get price at specific point in time\n```\n\n###### Create a symbol from the coingecko source with an id as it is used by coingecko:\n\n```python\ns3 = Symbol(\"bitcoin\", source=\"coingecko\")\ns3.price_graph()                # show price graph\n```\n\n###### Search for a crypto ticker on coingecko:\n\n```python\nres = search(\"name\")  # search and print search result summary\nfiltered = res.filter(source=\"coingecko\")  # filter results\nfiltered.p()  # print summary of filtered results\nfiltered.buckets[1].symbols  # review the 2nd bucket in the filtered results\ns4 = filtered.buckets[1].symbols[4]  # our symbol is the 5th in that list\ns4.price_history()  # get entire history\ns4.price_graph()  # visualize the price history\n```\n\n###### Build a collection of several symbols and use the collection to retrieve symbols:\n\n```python\nsc = SymbolCollection([s1, s2, s3, s4])   # create a collection w/ symbols from above\nsc.add(Symbol(\"AAPL\"))                    # add another one\nsc.find_one(\"SREN\").price_graph()\n```\n\n###### Store and load a symbol collection:\n\n```python\nsc.save_yaml(\"my_symbols.yaml\")\nsc_new = SymbolCollection()\nsc_new.load_yaml(\"my_symbols.yaml\")\n```\n\n###### Use a different currency preference:\n\n```python\nsc.find_one(\"ens\").price_latest()   # will return price in USD\nSymbol.currency_preference = \"CHF\"\nsc.find_one(\"ens\").price_latest()   # will return price in CHF\n```\n\nNote that `currency_preference` will only have an effect with sources that support it.\nIt is supported for Coingecko but not for Yahoo. So you should always verify the\neffective currency you receive in the result.\n\nOn Yahoo, some tickers are listed in several currency-specific variants that you can\ntry:\n\n```python\nSymbol(\"ETH-USD\").price_latest()  # will return the price in USD\nSymbol(\"ETH-EUR\").price_latest()  # will return the price in EUR\n```\n\n###### Accessing older crypto price information:\n\nCoingecko only provides a limited amount of historical data:\n\n```python\nfrom_date = (pendulum.now() - pendulum.duration(months=6)).to_date_string()\nSymbol(\"bitcoin\", source=\"coingecko\").price_point(from_date)\n# Will work because coingecko has data for the last year\nSymbol(\"bitcoin\", source=\"coingecko\").price_point(\"2020-08-01\")\n# Will result in a value error as the data is not available\n```\n\nYahoo also lists a number of crypto assets with longer history, so you can try that\nsource as well:\n\n```python\nSymbol(\"BTC-USD\").price_point(from_date)  # Should work, \"yahoo\" is the default source\n```\n\n###### `price_point` tries to be lenient and you can adjust the leniency:\n\nBy default, `price_point` will try to find the closest price to the requested date as\nlong as it's not more than `max_date_deviation_days` days away (default: 10 days).\n\n```python\nea = Symbol(\"EA\")\nea.price_point(\"2022-01-01\")  # Will return the price for 2021-12-31\nSymbol.max_date_deviation_days = 0\nea.price_point(\"2022-01-01\")  # Will raise a ValueError\n```\n\n\n## Data sources\n\ntessa builds on [yfinance](https://pypi.org/project/yfinance/) and\n[pycoingecko](https://github.com/man-c/pycoingecko) and offers **a simplified and\nunified interface**. \n\nWhy these two sources? Yahoo Finance (via yfinance) is fast and offers an extensive\ndatabase that also contains many non-US markets and many crypto tokens. Coingecko (via\npycoingecko) offers great access to crypto prices, but is limited to 1 year of\nhistorical data. \n\nMore sources can be added in the future. Let me know in the\n[issues](https://github.com/ymyke/tessa/issues) of you have a particular request.\n\n\n## Main submodules\n\n- [symbol](tessa/symbol.html): working with symbols and symbol collections.\n- [search](tessa/search.html): searching the different sources.\n- [price](tessa/price.html): accessing price functions directly instead of via the\n  `Symbol` class.\n- [sources](tessa/sources.html): if you'd like to add additional sources to the library.\n\n\n## How to install\n\n`pip install tessa`\n\n\n## Prerequisites\n\nSee `pyproject.toml`. Major prerequisites are the `yfinance` and `pycoingecko` packages\nto access finance information.\n\n\n## Repository\n\nhttps://github.com/ymyke/tessa\n\n\n## On terminology\n\nI'm using symbol instead of ticker because a ticker is mainly used for stock on stock\nmarkets, whereas tessa is inteded to be used for any kind of financial assets, e.g. also\ncrypto.\n\n\n## Other noteworthy libraries\n\n- [strela](https://github.com/ymyke/strela): A python package for financial alerts.\n- [pypme](https://github.com/ymyke/pypme): A Python package for PME (Public Market\n  Equivalent) calculation.\n\n\n## On investpy as a data source\n\nTessa used to use the [investpy package](https://github.com/alvarobartt/investpy) as the\nmain source of information until mid 2022 until investing.com introduced Cloudflare,\nwhich broke access by investpy. 😖 It is currently unclear if investpy will be available\nagain in the future. [You can follow the developments in issue\n600.](https://github.com/alvarobartt/investpy/issues/600) The old tessa/investpy code is\nstill available in the [add-symbols-based-on-investpy\nbranch](https://github.com/ymyke/tessa/tree/add-symbols-based-on-investpy).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fymyke%2Ftessa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fymyke%2Ftessa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fymyke%2Ftessa/lists"}