https://github.com/kutoga/yapsl Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code + Explore + All features + Documentation + GitHub Skills + Blog * Solutions + For + Enterprise + Teams + Startups + Compare all + By Solution + CI/CD & Automation + DevOps + DevSecOps + Case Studies + Customer Stories + Resources * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles + Repositories + Topics + Trending + Collections * Pricing [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} kutoga / yapsl Public * Notifications * Fork 0 * Star 3 Yet another python sms library 3 stars 0 forks Star Notifications * Code * Issues 0 * Pull requests 0 * Actions * Projects 0 * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Security * Insights kutoga/yapsl This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create 1 branch 0 tags Code * Clone HTTPS GitHub CLI [https://github.com/k] Use Git or checkout with SVN using the web URL. [gh repo clone kutoga] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @kutoga kutoga Update README ... e4830ea Nov 21, 2022 Update README e4830ea Git stats * 7 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time yapsl Version number Nov 21, 2022 .gitignore Initial commit Nov 20, 2022 README.md Update README Nov 21, 2022 poetry.lock Initial commit Nov 20, 2022 pyproject.toml Version number Nov 21, 2022 View code yapsl Installation Usage TODO README.md yapsl yapsl (Yet Another Python Sms Library) allows to send SMS from python by using a local connected modem (e.g. Huawei E220). It's required that the PIN is already entered (or that no PIN is used at all). If that's not the case, the library will raise an exception. Installation pip install yapsl Usage from yapsl import SmsType, SmsGateway gw = SmsGateway('/dev/ttyUSB0', verbose=False) # verbose=True is mostly for debugging purposes: # it'll show the complete communication with the modem # (plus some more logs) # Optional: It's possible to check if the modem is connected to a network (this is as well always done when sending an SMS) if not gw.is_connected(): print("Not connected!") print("Auto select network") gw.auto_select_network() sleep(60) # send an ordinary SMS gw.send('0786391538', 'this is a test message') # send a "flash"-SMS (this is usually a popup and by default these SMS are not stored) gw.send('0786391538', 'this is a test message', flash=True) # send a silent SMS (text wont be shown: this is just some kind of 'ping') gw.send('0786391538', 'this is a test message', type=SmsType.TYPE_0) # send a replaceable SMS (note there exist only 7 of these replaceable SMS) gw.send('0786391538', '3...', type=SmsType.REPLACE_TYPE_1) # replace the previous sent SMS (a few times) gw.send('0786391538', '2...', type=SmsType.REPLACE_TYPE_1) gw.send('0786391538', '1...', type=SmsType.REPLACE_TYPE_1) gw.send('0786391538', 'Hey:D', type=SmsType.REPLACE_TYPE_1) TODO * [ ] Allow it to get the 'sms-received-confirmations' in python About Yet another python sms library Resources Readme Stars 3 stars Watchers 1 watching Forks 0 forks Releases No releases published Packages 0 No packages published Languages * Python 100.0% Footer (c) 2022 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.