A code sample that enables you to enable you to export your Bookmarks to a CSV file. This code sample uses Flask and OAuth 2.0 Authorization code with PKCE. Check out a deployed version.
You need to sign up for access to the Twitter API. You will also create a project in the developer portal and an App containing the credentials required to use the Twitter API. Additionally, you will need to have OAuth 2.0 turned on in your App’s authentication settings. The developer playground is a great place to start using the Twitter API.