{"id":16200652,"url":"https://github.com/blackary/yf-fix","last_synced_at":"2025-04-07T17:56:51.585Z","repository":{"id":196536910,"uuid":"696318654","full_name":"blackary/yf-fix","owner":"blackary","description":"Fixing yfinance \u003e 0.2.28 on Streamlit Community Cloud","archived":false,"fork":false,"pushed_at":"2023-10-02T16:17:49.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-13T20:13:55.954Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blackary.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-09-25T14:12:33.000Z","updated_at":"2023-09-25T14:12:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"b524352d-43b7-4f5f-ae32-7304ee21e171","html_url":"https://github.com/blackary/yf-fix","commit_stats":{"total_commits":7,"total_committers":1,"mean_commits":7.0,"dds":0.0,"last_synced_commit":"7e3029a22274daf1bde67a987c026c1730b717dd"},"previous_names":["blackary/yf-fix"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackary%2Fyf-fix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackary%2Fyf-fix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackary%2Fyf-fix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackary%2Fyf-fix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blackary","download_url":"https://codeload.github.com/blackary/yf-fix/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247704516,"owners_count":20982293,"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":[],"created_at":"2024-10-10T09:32:44.773Z","updated_at":"2025-04-07T17:56:51.519Z","avatar_url":"https://github.com/blackary.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YFinance \u003e 0.2.28 support in Community Cloud\n\n# UPDATE 2023-10-01 This has been fixed with yfinance\u003e=0.2.31b2\n\n## OLD:\n\nyfinance changed the default behavior in version 0.2.29 to cache timezone info to\nimprove performance. However, the default place it tries to save the cache\n(`/home/appuser/.cache/`) doesn't exist on Streamlit Community Cloud.\n\nYou can get around this issue and still use the latest versions of yfinance by setting\na different cache directory than the default one, like this:\n\n```python\nfrom pathlib import Path\n\nimport appdirs as ad\n\nCACHE_DIR = \".cache\"\n\n# Force appdirs to say that the cache dir is .cache\nad.user_cache_dir = lambda *args: CACHE_DIR\n\n# Create the cache dir if it doesn't exist\nPath(CACHE_DIR).mkdir(exist_ok=True)\n```\n\nThis puts the timezone cache in a new folder inside the current folder, called .cache\n\n```\nstreamlit_app.py\n.cache/\n  py-yfinance/\n    tkr-tz.db\n```\n\n`.cache` isn't really special, but it's a writable location -- you can name the folder\nwhatever you want.\n\nThis bug has been reported here https://github.com/ranaroussi/yfinance/issues/1700\n\nThis app can be previewed at: https://yf-fix.streamlit.app/\n\nAlternatively, you can set `yfinance==0.2.28` in your requirements.txt to avoid this\nissue.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackary%2Fyf-fix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblackary%2Fyf-fix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackary%2Fyf-fix/lists"}