{"id":24154857,"url":"https://github.com/fasinfasi/financial-data-extraction","last_synced_at":"2026-05-08T04:12:20.870Z","repository":{"id":272053471,"uuid":"915372367","full_name":"fasinfasi/Financial-Data-Extraction","owner":"fasinfasi","description":"Using OpenAI API to extract data from the financial article news","archived":false,"fork":false,"pushed_at":"2025-01-11T19:14:34.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-01T22:28:12.451Z","etag":null,"topics":["data-extraction","financial-analysis","openai","openai-api","pandas-dataframe","python","streamlit"],"latest_commit_sha":null,"homepage":"","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/fasinfasi.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":"2025-01-11T17:14:58.000Z","updated_at":"2025-01-11T19:14:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"a049b5b5-a745-4233-9e37-381cc7fadb89","html_url":"https://github.com/fasinfasi/Financial-Data-Extraction","commit_stats":null,"previous_names":["fasinfasi/financial-data-extraction"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fasinfasi/Financial-Data-Extraction","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fasinfasi%2FFinancial-Data-Extraction","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fasinfasi%2FFinancial-Data-Extraction/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fasinfasi%2FFinancial-Data-Extraction/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fasinfasi%2FFinancial-Data-Extraction/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fasinfasi","download_url":"https://codeload.github.com/fasinfasi/Financial-Data-Extraction/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fasinfasi%2FFinancial-Data-Extraction/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271415496,"owners_count":24755639,"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","status":"online","status_checked_at":"2025-08-21T02:00:08.990Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["data-extraction","financial-analysis","openai","openai-api","pandas-dataframe","python","streamlit"],"created_at":"2025-01-12T12:26:13.955Z","updated_at":"2026-05-08T04:12:20.832Z","avatar_url":"https://github.com/fasinfasi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Financial Data Extraction 💵📑\n\nData extract from article that would expose as a table like structure. It can make easier to get the needed info from a given news article instead of read the whole article news.\nThe table contains the company name, stock symbol, revenue, net income, EPS. It specialized for commercial purpose.\n\nFollowing picture is the interface \u003e\u003e\u003e\n![image](https://github.com/user-attachments/assets/d5e0044c-60b7-4bad-96b4-b4513473c6c3)\n\n#### Prerequisites\n- Python 3.9+\n- openai API secret key\n- openai package\n- streamlit package\n\n## Clone the repository\n```\ngit clone https://github.com/fasinfasi/Financial-Data-Extraction.git\ncd Financial-Data-Extraction\n```\n\ninstall packages\n```\npip install openai\npip install streamlit\n```\n\n## Getting OpenAI API key\n- create account in openai\n- login with email\n- Go to [https://platform.openai.com/apps](https://platform.openai.com/apps)\n- Tap on API\n- Give details\n- Copy the api secret key (start with 'sk-')\n#### Note:  OpenAI API key is sensitive information, and you must treat it as a secret to avoid unauthorized use. If someone else gets access to your API key, they could misuse it, leading to unexpected costs or violations of the OpenAI terms of service.\n\n## To make the api secret key safe\n### Step 1:\n```\ncd Financial-Data-Extraction\n```\ncreate a file name .env, then insert it\n```\nOPENAI_API_KEY = your_api_key\n```\nThen, Save it\n### Step2:\nCreate .gitignore file and then just add\n```\n.env\n```\nSave it\n\nNow the secret key is safe, No one to see when you make it public repo\n\n## Use the .env File in Your Code\n- In Python, install the python-dotenv library:\n```\npip install python-dotenv\n```\n- Update your code to load the environment variable from the .env file:\n```\nfrom dotenv import load_dotenv\nimport os\n\n# Load variables from .env\nload_dotenv()\n\n# Access the OpenAI API key\napi_key = os.getenv(\"OPENAI_API_KEY\")\n```\nNow the api key is ready!\n\n## Usage\n#### 1. Access the Streamlit's web app\n- Open the frontend in your browser by run\n``` streamlit run main.py ```\n#### 2. Put the article\n- Give the news article to the text area on the left side of the screen\n- Tap on the Extract button\n#### 3. View result\n- The Extracted data will display on the right side table\n\nFeel free to use and adapt this README! Let me know if you'd like further refinements🤗.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffasinfasi%2Ffinancial-data-extraction","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffasinfasi%2Ffinancial-data-extraction","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffasinfasi%2Ffinancial-data-extraction/lists"}