{"id":34060633,"url":"https://github.com/altiria/sms-python-client","last_synced_at":"2026-04-02T02:08:27.690Z","repository":{"id":57468788,"uuid":"428605088","full_name":"altiria/sms-python-client","owner":"altiria","description":"Cliente Python oficial de Altiria para el envío de SMS transaccionales","archived":false,"fork":false,"pushed_at":"2022-03-28T09:49:29.000Z","size":33,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-02T16:12:05.232Z","etag":null,"topics":["altiria","envio-de-sms","envio-sms","http-client","pip","pip3","python","python3","sms-api","sms-gateway","sms-messages","sms-notifications","sms-pasarela","sms-python","sms-transaccional","smsapi"],"latest_commit_sha":null,"homepage":"https://www.altiria.com/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/altiria.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-16T10:10:16.000Z","updated_at":"2022-01-03T16:45:27.000Z","dependencies_parsed_at":"2022-09-19T10:10:15.946Z","dependency_job_id":null,"html_url":"https://github.com/altiria/sms-python-client","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/altiria/sms-python-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/altiria%2Fsms-python-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/altiria%2Fsms-python-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/altiria%2Fsms-python-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/altiria%2Fsms-python-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/altiria","download_url":"https://codeload.github.com/altiria/sms-python-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/altiria%2Fsms-python-client/sbom","scorecard":{"id":187243,"data":{"date":"2025-08-11","repo":{"name":"github.com/altiria/sms-python-client","commit":"4bb177e98543d98b32519e4796bb222e0c29f339"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/27 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-16T19:59:54.410Z","repository_id":57468788,"created_at":"2025-08-16T19:59:54.411Z","updated_at":"2025-08-16T19:59:54.411Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31294399,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T01:43:37.129Z","status":"online","status_checked_at":"2026-04-02T02:00:08.535Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["altiria","envio-de-sms","envio-sms","http-client","pip","pip3","python","python3","sms-api","sms-gateway","sms-messages","sms-notifications","sms-pasarela","sms-python","sms-transaccional","smsapi"],"created_at":"2025-12-14T04:12:50.834Z","updated_at":"2026-04-02T02:08:27.681Z","avatar_url":"https://github.com/altiria.png","language":"Python","readme":"![](http://static.altiria.com/wp-content/themes/altiria/images/logo-altiria.png)\n\n# Altiria, cliente SMS Python\n\n ![](https://img.shields.io/badge/version-1.0.4-blue.svg)\n \nAltiria SMS Python es el cliente de envío de SMS que simplifica al máximo la integración del API SMS para Python de Altiria.\n- **Envíos de SMS individuales** con las siguientes características:\n  - sencillos\n  - concatenados\n  - uso de remitente\n  - seleccionar codificación\n  - certificación de entrega con o sin identificador\n  - certificado digital de entrega\n\n- **Consultas de crédito**\n\n## Requisitos\n\n- python 2.7+, 3.+.\n\nAunque este módulo es compatible con la versión 2 de python, **se recomienda utilizar la versión 3**.\n\n## Instalación\n\nLa forma recomendada de instalar el cliente Altiria para Python es a través de **pip** .\n\n### Si tienes PIP instalado\n\n\u003cpre\u003e\nsudo pip install sms-python-client\n\u003c/pre\u003e\n\n### Si no tienes PIP instalado\n\n\u003cpre\u003e\ngit clone https://github.com/altiria/sms-python-client.git\n\ncd sms-python-client\n\npython setup.py install\n\u003c/pre\u003e\n\n## Ejemplos de uso\n\n### Envío de SMS\n\nA continuación se describen cada una de las posibilidades de uso de la librería para realizar envíos de SMS.\n\n#### Ejemplo básico\n\nSe trata de la opción más sencilla para realizar un envío de SMS.\n\n```python\nfrom sms_api.altiria_client import *\n\ntry:\n\tclient = AltiriaClient('miusuario@email.com', 'contraseña')\n\ttextMessage = AltiriaModelTextMessage('346XXXXXXXX', 'Mensaje de prueba')\n\tjsonText = client.sendSms(textMessage)\n\tprint('¡Mensaje enviado!')\nexcept AltiriaGwException as ae:\n\tprint('Mensaje no aceptado:'+ae.message)\n\tprint('Código de error:'+ae.status)\nexcept JsonException as je:\n\tprint('Error en la petición:'+je.message)\nexcept ConnectionException as ce:\n\tif \"RESPONSE_TIMEOUT\" in ce.message: \n\t\tprint('Tiempo de respuesta agotado:'+ce.message)\n\telse:\n\t\tprint('Tiempo de conexión agotado:'+ce.message)\n```\n\n#### Ejemplo básico con timeout personalizado\n\nPermite fijar el tiempo de respuesta en milisegundos. Si se supera se lanzará una **ConnectionException**.\nPor defecto el tiempo de respuesta es de 10 segundos, pero puede ser ajustado entre 1 y 30 segundos.\n\n```python\nfrom sms_api.altiria_client import *\n\ntry:\n\tclient = AltiriaClient('miusuario@email.com', 'contraseña', False, 5000)\n\ttextMessage = AltiriaModelTextMessage('346XXXXXXXX', 'Mensaje de prueba')\n\tjsonText = client.sendSms(textMessage)\n\tprint('¡Mensaje enviado!')\nexcept AltiriaGwException as ae:\n\tprint('Mensaje no aceptado:'+ae.message)\n\tprint('Código de error:'+ae.status)\nexcept JsonException as je:\n\tprint('Error en la petición:'+je.message)\nexcept ConnectionException as ce:\n\tif \"RESPONSE_TIMEOUT\" in ce.message: \n\t\tprint('Tiempo de respuesta agotado:'+ce.message)\n\telse:\n\t\tprint('Tiempo de conexión agotado:'+ce.message)\n```\n\n#### Ejemplo básico con remitente\n\nSe trata de la opción más sencilla para realizar un envío de SMS añadiendo remitente. En este caso, se ilustra cómo realizar la autentificación mediante APIKEY, donde \"XXXXXXXXXX\" es el parámetro **apiKey** y \"YYYYYYYYYY\" el parámetro **apiSecret**.\n\n```python\nfrom sms_api.altiria_client import *\n\ntry:\n\tclient = AltiriaClient('XXXXXXXXXX', 'YYYYYYYYYY', True)\n\ttextMessage = AltiriaModelTextMessage('346XXXXXXXX', 'Mensaje de prueba', 'miRemitente')\n\tjsonText = client.sendSms(textMessage)\n\tprint('¡Mensaje enviado!')\nexcept AltiriaGwException as ae:\n\tprint('Mensaje no aceptado:'+ae.message)\n\tprint('Código de error:'+ae.status)\nexcept JsonException as je:\n\tprint('Error en la petición:'+je.message)\nexcept ConnectionException as ce:\n\tif \"RESPONSE_TIMEOUT\" in ce.message: \n\t\tprint('Tiempo de respuesta agotado:'+ce.message)\n\telse:\n\t\tprint('Tiempo de conexión agotado:'+ce.message)\n```\n#### Ejemplo con todos los parámetros\n\nSe muestra un ejemplo utilizando todos los parámetros e integrando el módulo de **logging**.\nLa implementación de este módulo permite depurar el log de la librería.\n\n##### La siguiente limitación afecta solamente a python 2**:\nTal y como se indica en el código, se recomienda desactivar la excepciones generadas por el módulo de logging si se utiliza la versión 2 de python.\nDe lo contrario, este módulo lanzará excepciones si el mensaje contiene caracteres no ASCII.\nHay que tener en cuenta que las líneas de log que terminan en error son omitidas.\n\n```python\nfrom sms_api.altiria_client import *\nimport logging\n\nlogging.basicConfig(filename='app.log',\n                            filemode='a',\n                            format='%(asctime)s %(levelname)s %(module)s.%(funcName)s:%(lineno)d [%(thread)d, %(threadName)s] - %(message)s',\n                            datefmt='%d/%m/%Y %H:%M:%S',\n                            level=logging.DEBUG)\n# Uncomment only to python 2\n#logging.raiseExceptions = False\n\ntry:\n    \tlogging.debug('Enviando SMS...')\n\tclient = AltiriaClient('miusuario@email.com', 'contraseña')\n\tclient.setConnectionTimeout(1000)\n\tclient.setTimeout(5000)\n\ttextMessage = AltiriaModelTextMessage('346XXXXXXXX', 'Mensaje de prueba')\n\ttextMessage.senderId='miRemitente'\n\ttextMessage.ack=True\n\ttextMessage.idAck='idAck'\n\ttextMessage.concat=True\n\ttextMessage.encoding='unicode'\n\ttextMessage.certDelivery=True\n\tjsonText = client.sendSms(textMessage)\n\tprint('¡Mensaje enviado!')\nexcept AltiriaGwException as ae:\n\tprint('Mensaje no aceptado:'+ae.message)\n\tprint('Código de error:'+ae.status)\nexcept JsonException as je:\n\tprint('Error en la petición:'+je.message)\nexcept ConnectionException as ce:\n\tif \"RESPONSE_TIMEOUT\" in ce.message: \n\t\tprint('Tiempo de respuesta agotado:'+ce.message)\n\telse:\n\t\tprint('Tiempo de conexión agotado:'+ce.message)\n```\n### Consulta de crédito\n\nEjemplos de consulta del crédito de SMS en la cuenta de Altiria.\n\n#### Ejemplo básico\n\nEste ejemplo no incluye los parámetros opcionales.\n\n```python\nfrom sms_api.altiria_client import *\n\ntry:\n\tclient = AltiriaClient('miusuario@email.com', 'contraseña')\n\tcredit = client.getCredit()\n\tprint('Crédito disponible: '+credit)\nexcept AltiriaGwException as ae:\n\tprint('Solicitud no aceptada:'+ae.message)\n\tprint('Código de error:'+ae.status)\nexcept JsonException as je:\n\tprint('Error en la petición:'+je.message)\nexcept ConnectionException as ce:\n\tif \"RESPONSE_TIMEOUT\" in ce.message: \n\t\tprint('Tiempo de respuesta agotado:'+ce.message)\n\telse:\n\t\tprint('Tiempo de conexión agotado:'+ce.message)\n```\n\n#### Ejemplo con timeout\n\nEste ejemplo permite definir el timeout de la conexión.\n\n```python\nfrom sms_api.altiria_client import *\n\ntry:\n\tclient = AltiriaClient('miusuario@email.com', 'contraseña')\n    \tclient.setConnectionTimeout(1000)\n\tclient.setTimeout(5000)\n\tcredit = client.getCredit()\n\tprint('Crédito disponible: '+credit)\nexcept AltiriaGwException as ae:\n\tprint('Solicitud no aceptada:'+ae.message)\n\tprint('Código de error:'+ae.status)\nexcept JsonException as je:\n\tprint('Error en la petición:'+je.message)\nexcept ConnectionException as ce:\n\tif \"RESPONSE_TIMEOUT\" in ce.message: \n\t\tprint('Tiempo de respuesta agotado:'+ce.message)\n\telse:\n\t\tprint('Tiempo de conexión agotado:'+ce.message)\n```\n\n## Licencia\n\nLa licencia de esta librería es de tipo MIT. Para más información consultar el fichero de licencia.\n\n## Ayuda\n\nUtilizamos la sección de problemas de GitHub para tratar errores y valorar nuevas funciones.\nPara cualquier problema durante la intergración contactar a través del email soporte@altiria.com.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faltiria%2Fsms-python-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faltiria%2Fsms-python-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faltiria%2Fsms-python-client/lists"}