{"id":21492113,"url":"https://github.com/colddsam/localstore","last_synced_at":"2026-04-13T23:33:17.773Z","repository":{"id":218745217,"uuid":"747264830","full_name":"colddsam/LocalStore","owner":"colddsam","description":"LocalStore is a Python library that provides various operations on a local database of products, which can be used to store and manage information about items in a local store inventory.","archived":false,"fork":false,"pushed_at":"2024-01-27T13:25:46.000Z","size":12013,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-27T05:26:30.400Z","etag":null,"topics":["converter","database","dataset-generation","fastapi","pypi","pypi-package","python","python3"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/localstore/","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/colddsam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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}},"created_at":"2024-01-23T15:40:37.000Z","updated_at":"2024-01-25T15:54:08.000Z","dependencies_parsed_at":"2024-01-25T16:45:48.853Z","dependency_job_id":"51805e81-3ed9-4e50-996a-0875133d2bd0","html_url":"https://github.com/colddsam/LocalStore","commit_stats":null,"previous_names":["colddsam/localstore"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/colddsam/LocalStore","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colddsam%2FLocalStore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colddsam%2FLocalStore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colddsam%2FLocalStore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colddsam%2FLocalStore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/colddsam","download_url":"https://codeload.github.com/colddsam/LocalStore/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colddsam%2FLocalStore/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31775878,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T20:17:16.280Z","status":"ssl_error","status_checked_at":"2026-04-13T20:17:08.216Z","response_time":93,"last_error":"SSL_read: 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":["converter","database","dataset-generation","fastapi","pypi","pypi-package","python","python3"],"created_at":"2024-11-23T15:22:29.590Z","updated_at":"2026-04-13T23:33:17.743Z","avatar_url":"https://github.com/colddsam.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# localstore\n\nThe `localstore` package is a collection of Python modules for managing data in a local store. It includes modules for converting CSV files to a JSON dataset, managing data in a local JSON store, and creating a local API for accessing data in the store.\n\n## Installation\n\nTo install the `localstore` package, you can use pip:\n\n```\npip install localstore\n```\n\n## Usage\n\n### DatasetConverter\n\nThe `DatasetConverter` module provides a simple and intuitive API for converting CSV files to a JSON dataset. To use the `DatasetConverter` module, you can:\n\n1. Import the `DatasetConverter` module:\n\n```python\nfrom localstore.DatasetConverter import Converter\n```\n\n2. Create an instance of the `Converter` class:\n\n```python\nconverter = Converter()\n```\n\n3. Convert all the CSV files in a specified directory to a JSON dataset:\n\n```python\nconverter.Dataset_From_Directory('path/to/directory')\n```\n\n4. Convert a single CSV file to a JSON dataset:\n\n```python\nconverter.Dataset_From_File('path/to/file.csv')\n```\n\n5. Create a JSON dataset file and a text file containing the length of the dataset:\n\n```python\nconverter.Create_Dataset()\n```\n\n### LocalStore\n\nThe `LocalStore` module provides a simple and intuitive API for managing data in a local JSON store. To use the `LocalStore` module, you can:\n\n1. Import the `LocalStore` module:\n\n```python\nfrom localstore.LocalStore import LocalStore\n```\n\n2. Create an instance of the `LocalStore` class:\n\n```python\nlocal_store = LocalStore()\n```\n\n3. Add a new product to the local store:\n\n```python\nproduct = {\n    'name': 'iPhone 13 Pro',\n    'main_category': 'Electronics',\n    'sub_category': 'Smartphones',\n    'image': 'https://example.com/iphone-13-pro.jpg',\n    'link': 'https://example.com/iphone-13-pro',\n    'ratings': '4.5',\n    'no_of_ratings': '100',\n    'discount_price': '999.00',\n    'actual_price': '1099.00'\n}\nlocal_store.Add_New_Product(product_name='Apple', data=product)\n```\n\n4. Get a list of all the products in the local store:\n\n```python\nproducts = local_store.Show_product_List()\n```\n\n5. Print the list of products:\n\n```python\nfor product in products:\n    print(product)\n```\n\n### LocalAPI\n\nThe `LocalAPI` module provides a simple and intuitive API for creating a local API for accessing data in the store. To use the `LocalAPI` module, you can:\n\n1. Import the `LocalAPI` module:\n\n```python\nfrom localstore.LocalAPI import LocalAPI\n```\n\n2. Create an instance of the `LocalAPI` class:\n\n```python\nlocal_api = LocalAPI()\n```\n\n3. Start the LocalAPI server:\n\n```python\nlocal_api.runServer()\n```\n\n4. Send API requests to the LocalAPI server to perform CRUD operations on data in the local store:\n\n```python\nimport requests\n\n# Get a list of all the products in the local store\nproducts = requests.get('http://localhost:5000/products/show/')\n\n# Print the list of products\nfor product in products.json():\n    print(product)\n```\n\n## Conclusion\n\nThe `localstore` package is a powerful and easy-to-use Python package for managing data in a local store. It is a great choice for a variety of applications, including e-commerce websites, content management systems, data analysis applications, and any other application that needs to store data locally. \n\n## Contributing\n\nContributions to LocalStore are welcome! Please read the [contributing guidelines](https://github.com/colddsam/LocalStore/blob/main/CONTRIBUTING.md) before submitting a pull request.\n\n## License\n\nLocalStore is licensed under the [MIT License](https://github.com/colddsam/LocalStore/blob/b21bdae42f8a31a7ca5e9d954dace06d66c132f6/LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolddsam%2Flocalstore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcolddsam%2Flocalstore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolddsam%2Flocalstore/lists"}