Package: xpost
xpost - Python CLI for Twitter Operationsxpost is a command-line interface (CLI) Python package for interacting with Twitter. It allows users to tweet, add users, store API credentials securely, and delete tweets.FeaturesTweeting: Effortlessly post tweets from the command line.Credential Storage: Securely encrypt and store your Twitter API credentials using the robustPBKDF2HMACalgorithms, ensuring security.Tweet Deletion: Conveniently delete tweets with a simple command.InstallationInstall xpost using pip:pipinstallxpostVerify the installation by checking the versio:xpost--versionUsageAdding user Authentication CredentialsSecurely store your Twitter API credentials:$x-configadd_user
EnterausernametoencryptyourAPIs:usrDarwin
SetapasswordtosecureyourencryptedAPIs:
Confirmyourpassword:
EnterCLIENT_ID:client_id
EnterCLIENT_SECRET:client_secret
EnterAPI_KEY:api_key
EnterAPI_KEY_SECRET:apiKey
EnterBEARER_TOKEN:bTokn
EnterACCESS_TOKEN:aTokn
EnterACCESS_TOKEN_SECRET:aTokn_secret
Savingyourencrypteddata...
-Credentialsencryptedandstoredsuccessfully.
Savingcompleted.Datastoredat:~/.tweet

Usercredentialssuccessfullyadded.Viewing Stored CredentialsCheck your encrypted credentials:$ls~/.tweetOr view decrypted credentials:>>>importxpostasx>>>x.show_credentials()EnteryourusernametodecryptyourAPIs:test_usrEnteryourpasswordtodecryptyourAPIs:{'CLIENT_ID':'client_id','CLIENT_SECRET':'client_secret','API_KEY':'api_key','API_KEY_SECRET':'apiKey','BEARER_TOKEN':'bTokn','ACCESS_TOKEN':'aTokn','ACCESS_TOKEN_SECRET':'aTokn_secret'}Reset your APIsPermanently delete all stored credentials:To reset your APIs$x-configreset
Doyouwanttodeletealldata?[Y/n]:Y
WARNING:Thiswillpermanentlydeletealldata,includingproductionAPIkeys.Confirmwith'Y'orcancelwith'N':Y
Processingdeletion....

Alluserfilesin~/.tweethavebeensuccessfullydeleted.
Datadeletionsuccessfull.Command Usage ExamplesUse thexcommand to perform tweeting operations. Below are examples of how to use the command:Posting a TweetTo post a tweet directly message or from a text file:$x--post"Your message to be tweeted"$x--post"path/to/text/file.txt"Important: The username and password you provide are used for decrypting your encrypted API credentials.$x--post"Hello, X!"EnteryourusernametodecryptyoursavedAPIs:test_usr
EnteryourpasswordtodecryptyoursavedAPIs:
INFO:root:Tweetsuccessfullyposted.TweetID:1728786247492247770Twitterpost:
Hello,X!

INFO:root:Tweetinfosavedtothedatabase.
TweetURL:https://twitter.com/eulerDavinci/status/1728786247492247770Deleting a TweetRemove a tweet by its ID:$x--delete<TweetID>$x--delete1728786247492247770EnteryourusernametodecryptyoursavedAPIs:test_usr
EnteryourpasswordtodecryptyoursavedAPIs:
INFO:root:Tweetdeletedsuccessfullyfromtwitter.com
INFO:root:TweetwithID1728786247492247770removedfromdatabase.
Tweetsuccessfullydeleted.Licensexpost is released under the MIT License. See theLICENSEfile for more details.ContributionsContributions are welcome from anyone, even if you are new to open source. If you are new and looking for some way to contribute, a good place to start is documentation and docstring.Please note that all participants in this project are expected to follow our Code of Conduct. By participating in this project you agree to abide by its terms. SeeCODE OF CONDUCTSSupportFor support, please open an issue on the GitHub repository.TestsTo ensure the functionality ofxpost, you can run the following test commands. These commands test various functionalities of the xpost package.First, import the necessary functions fromxpost:fromxpostimport*Testing Configuration CommandsUse these functions to test configuration-related operations:Adding a User: Adds a new user and stores their credentials.add_user()Resets all stored credentials.reset_credentials()Display the stored credentials.show_credentials()Testing Tweet OperationsTo test tweeting functionalities, use these functions:Posts a new tweet.post_tweet()Deletes an existing tweet.delete_tweet()Feedback and Feature RequestsYour feedback is incredibly valuable to us! For any feedback or feature requests, please reach out via email. We appreciate your input in enhancing xpost.Please note,xpostis intentionally designed with a focus on basic features. This is to minimize distractions often associated with social media platforms, allowing users to concentrate on meaningful content creation. Our goal is to facilitate a simplified and efficient tweeting experience, enabling users to reflect on their past posts in the future.