
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
twetch2py
Advanced tools
A class-based library for using the Twetch SDK with Python.
npm install -g @twetch/sdk
twetch init
twetch2py on pip:pip3 install twetch2py
twetch2py into your project:from twetch2py import Twetch
Once instantiated, Twetch objects have the following attributes:
content: A string for text-based posts. Accepts @ and branch URLs.media: Filename for rich media (like images). Relative paths will be converted to absolute before publishing.reply_tx: A transaction ID of a post to reply to.like_tx: A transaction ID of a post to like.published_url: Successful posts and likes will set the URL of your Twetch to this attribute.tweet: Boolean. If True, the target Twetch will be cross-posted to Twitter.hide_link: Boolean. If true and tweet also evaluets to True, the Twetch link will be hidden on Twitter.The library can also fetch the following information about your Twetch SDK install:
get_balance(): Returns your signing address balance in BSV.get_address(): Returns the signing address of your Twetch SDK BSV wallet.# Make a text post
my_twetch = Twetch(content="Hello from Python!")
my_twetch.publish()
# Branch a post
my_branch = Twetch(content="https://twetch.app/t/b9ca41ea6e7302016ab039babe19548f74feccdbd2addbc1c50b3e49907e6ef4")
my_branch.publish()
# Quote a post
my_quote = Twetch(content="This is a quote branch! https://twetch.app/t/b9ca41ea6e7302016ab039babe19548f74feccdbd2addbc1c50b3e49907e6ef4")
my_quote.publish()
# Post an image
my_image_twetch = Twetch(content="Image from Python!", media="images/myimage.jpg")
my_image_twetch.publish()
# Reply to a post
my_reply = Twetch(content="Hello fellow Twetcher!", reply_tx="b9ca41ea6e7302016ab039babe19548f74feccdbd2addbc1c50b3e49907e6ef4")
my_reply.publish()
# Reply to a post w/image and text
my_reply = Twetch(content="Hello with image!", media="images/myimage.jpg", reply_tx="b9ca41ea6e7302016ab039babe19548f74feccdbd2addbc1c50b3e49907e6ef4")
my_reply.publish()
# Tweet from Twetch
my_twetch = Twetch(content="Hello Twitter from Twetch!", tweet=True)
my_twetch.publish()
# Tweet from Twetch, hide Twetch link on Twitter
my_twetch = Twetch(content="Hello Twitter from Twetch!", tweet=True, hide_link=True)
my_twetch.publish()
# Like a post
my_like = Twetch(like_tx="b9ca41ea6e7302016ab039babe19548f74feccdbd2addbc1c50b3e49907e6ef4")
my_like.like_twetch()
# Print your active signing address (returns a string)
twetch_object = Twetch()
print(twetch_object.get_address())
# Print the balance of your signing wallet (returns a float)
twetch_object = Twetch()
print(twetch_object.get_balance())
Twetch2py is offered by Cyphergato, LLC. under the MIT License and is free to use.
If you find this open source library useful, please consider donating to support its development!
cyphergato@moneybutton.com12Jm4J1GxWfA52JdiYHLovhwaFmy89LD6QFAQs
A class-based implementation of the Twetch SDK for Python
We found that twetch2py demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.