devsbranch / devsbranch/orm_operator
Export and load Bookmark Data to CSV file
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
@Jachin-Manda please find below description of the issue you will be working on next.
we need to have a **.csv** file that we can do the following for local testing
* NOTE: we do not want to version control the db hence we will delete it and you will create a fresh local one upon running the project locally. To this
We want to achieve the following
* Jachin should be able to
- [x] Get bookmark input data from CLI user input
- [x] Create a **BmkTable** object with this data and
- [x] Save this data to the database locally for your testing and other needs
* What if Felix then wants to work with sample data without going through the trouble of entering some sample bookmaks manually from user input?
This is where we want to extend capability of this project to achieve the following
- [x] After all the sample data is saved to db, maybe at the end of your local work, you should be able to run this script which will then get all the db objects and get their field name data as a row which will then be appended to a CSV file that we shall name: **fixture_data.csv**
- [x] to this, Felix should then be able to just run a script which loads this row data from a csv and creates a corresponding **BmkTable** object for writing to the db for his local testing.
* Hence, a summery of this is as follows
- [x] get dynamic bookmark creation input from a CLI user
- [x] create BmkTable object with it and save to db
- [x] add csv read writer object in a seperate module called **data_utils.py**, which shall be responsible for
- [x] writing only **UNIQUE** object data to a csv flat file called **fixture_data.csv**
- [x] add another capability to this module to be able to read the unique record data from this csv into the BmkTable object for saving to db for local testing.
- [x] CSV row data should be seperated by a comma delimeter
- [x] csv file should have header row on first line which should never be read for writing to db
`Title, URL, description, date`
please reference the builtin python CSV module for convinience
👉🏽 https://docs.python.org/3/library/csv.html
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.