Saravanan666/pypi-org huggingface dataset:
Package: telerivet
Python client library for Telerivet REST APIhttps://telerivet.com/apiOverviewThis library makes it easy to integrate your Python application with Telerivet.
You can use it to:send SMS messages via an Android phone or SMS gateway serviceupdate contact information in Telerivet (e.g. from a signup form on your own website)add or remove contacts from groupsexport your message/contact data from Telerivet into your own systemsschedule messages to be sent at a later timecontrol automated servicesmuch moreAll API methods are fully documented athttps://telerivet.com/api/rest/python,
as well as in the comments of the Python source files.To learn what functionality is available, start withtelerivet/__init__.py,telerivet/project.py, andtelerivet/apicursor.py.System RequirementsPython 2.6 or higher (including Python 3)InstallationTelerivet's Python client library is distributed viapip(https://pypi.org/project/telerivet/). If you havepip, run:pip install telerivetAlternatively, if you don't havepip, you can install the install the library into your site-packages by downloading the code and running:python setup.py installThe installation process will also install therequestsmodule if it is not already installed (https://requests.readthedocs.io/).Example Usagefrom __future__ import print_function # python 2/3 compatibility for example code

import telerivet

API_KEY = 'YOUR_API_KEY'  # from https://telerivet.com/api/keys
PROJECT_ID = 'YOUR_PROJECT_ID'

tr = telerivet.API(API_KEY)

project = tr.initProjectById(PROJECT_ID)

# Send a SMS message
project.sendMessage(
    to_number = '555-0001',
    content = 'Hello world!'
)

# Query contacts
name_prefix = 'John';
cursor = project.queryContacts(
    name = {'prefix': name_prefix},
    sort = 'name'
).limit(20)

print("%d contacts matching %s:\n" % (cursor.count(), name_prefix))

for contact in cursor:
    print(contact.name, contact.phone_number, contact.vars.birthdate)

# Import a contact
contact = project.getOrCreateContact(
    name = 'John Smith',
    phone_number = '555-0001',
    vars = {
        'birthdate': '1981-03-04',
        'network': 'Vodacom'
    }
)

# Add a contact to a group
group = project.getOrCreateGroup('Subscribers')
contact.addToGroup(group)
Package: telescoop-auth
Telescoop AuthQuick startAdd "Telescop Auth" to your INSTALLED_APPS setting like this::INSTALLED_APPS=[...'telescoop_auth',]Update AUTH_USER_MODELIn your settings.py, setAUTH_USER_MODEL = 'telescoop_auth.User'Include the Telescop Auth URLconf in your project urls.py like this::path('auth/', include('telescoop_auth.urls')),Runpython manage.py migrateto create the auth models.
Package: telescoop-backup
Telescoop BackupBackup your sqlite database to an S3 compatible provider.Quick startConfigurationAdd "Telescop Backup" to your INSTALLED_APPS setting like this::INSTALLED_APPS=[...'telescoop_backup',]Include the Telescop Backup URLconf in your project urls.py like this::path('backup/',include('telescoop_backup.urls')),Define the following settings insettings.pyBACKUP_ACCESS='my_access'# S3 ACCESSBACKUP_SECRET='my_secret'# S3 SECRET KEYBACKUP_BUCKET='my_project_backup'# S3 BucketBACKUP_KEEP_N_DAYS=31# Optional, defaults to 31BACKUP_HOST=None# Optional, default to s3.fr-par.scw.cloud (Scaleway Storage)By default, old backups are removed in order not to take up too much space.
If you don't want them removed, just set a very large value for BACKUP_KEEP_N_DAYS.BackupYou can now backup with thebackup_dbmanagement command :python manage.py backup_db backupto back up current databasepython manage.py backup_db mediato back upsettings.MEDIA_ROOTpython manage.py backup_db listto list previous backupspython manage.py backup_db recover [file_name]to recover previous databaseView last backup and if it is recent/backup/last-backupshows the latest backup/backup/backup-is-less-than-XX-hours-oldanswersyes(status 200) orno(status 500). This route can be used with a service
such as uptimerobot.com.GitignoreIf you use it in local environment, ignore the backup files.telescoop_backup_last_backup
*.sqlite
Package: telescope-distance
telescope-distanceTelescope-distance is a Python package for time-series clustering based on the telescope distance[1]as a metric over the space of infinite dimensional measures.InstallationDependenciestelescope-distance requires:Python (>= 3.5)NumPySciPySciKit-learnUser installationMake sure that you have Python 3.5+ and pip installed. We recommend installing the stable version of
telescope-distance withpip:$ pip install telescope-distanceAlternatively, you can also clone the source of the latest version with:$ git clone https://github.com/soheil-arab/telescope-distanceThen install directly from source with:$ python setup.py installExamplesAshort exampleis as below.importfunctoolsfromsklearnimportsvmfromtelescope_distanceimporttelescopefromtelescope_distance.generatorsimportgenerators#generates two sample path from two arbitrary 3rd order markov chainmc_1=generators.MarkovChain(2,3)x=mc_1.generate_sample_path(1000)mc_2=generators.MarkovChain(2,3)y=mc_2.generate_sample_path(1000)weights_fn=lambdak:k**-2clf_constructor=functools.partial(svm.SVC,kernel='rbf',max_iter=-1)TD=telescope.TelescopeDistance(clf_constructor,weights_fn)print(f'empirical estimate of TD between MC_1 and MC_2 is{TD.distance(x,y)}')References[1]Ryabko, Daniil, and Jérémie Mary. "A binary-classification-based metric between time-series distributions and its use in statistical and learning problems." The Journal of Machine Learning Research 14.1 (2013): 2837-2856.
Package: telescopes
Telescopespipinstall-e.[test]jupyterlabextensiondevelop.--overwrite
jupyterlabextensionlist
jupyterserverextensionlist# open http://localhost:8686/api/jupyter/lab?token=60c1661cc408f978c309d04157af55c9588ff9557c9380e4fb50785750703da6yarnjupyterlab
Package: telescope-sdk
Telescope Python SDKPackage containing Pydantic models representing the entities used in Telescope backend systems. The source of truth
for these types liveshere.SeeDeploymentfor instructions on how to publish a new version of this package.Usage$pipinstalltelescope-sdkTo construct an entity (e.g. Person) you can use the constructor
(please note Pydantic only accepts keyword arguments):fromtelescope_sdkimportPersonperson=Person(id="123",first_name="John Doe",...)Or, to construct from a Python dictionary object:person=Person.parse_obj({"id":"123","first_name":"John Doe",...})If you are mapping fromPDLtypes, use thefrom_pdlmethod:person=Person.from_pdl({"id":"123","firstName":"John Doe",...})Please note that unless a field is set as "Strict", it will automatically attempt to cast any input,
and only throw an error if casting failsDevelopmentTo make changes to this package clone the repo and follow the steps below. Please ensure that any changes to the code
base are synced with the documentation linked above.InstallationFirst set up a virtual environment to isolate dependencies. You can do this in many ways but as an example:$pyenvvirtualenv3.10.0<chosen-virtualenv-name>
$pyenvactivate<chosen-virtualenv-name>Note this codebase takes advantage of features from Python 3.10+ therefore you may run into errors if you attempt to use
an earlier Python version.This project relies on Poetry for dependency management. To install Poetry follow the instructionshere(recommend usingpipxto
install Poetry globally but manage in virtualenv).Now ensure you have Make on your machine then run$makeinstallThis will install the package and its dependencies ineditable mode.TestingTo run tests locally, run the following command:$maketestLintingTo run linting locally, run the following command:$makelintDeploymentA new package version is published to PyPI whenever a new release is created on GitHub. To create a new release follow
the following steps, from themasterbranch:Update the version number inpyproject.tomlto the new version number (use semantic versioning).Create a new release on GitHub with the same version number as the one inpyproject.toml.Draft release notes for the new version. These will be used as the package description on PyPI.The new version will be published toPyPIautomatically.On pushes to themasterbranch, thesandbox-deployjob will run and publish a new version of the package toTestPyPI. This is useful for testing changes to the package before publishing to PyPI.
Package: teleserver
teleserver CLIThis package is CLI tool to teleserver project - a remote way to control your office TV.Project's page:teleserverIdeaThis CLI allows user to send API requests without need of providing service principal token to request.UsageFirst, install this package with pippip install teleserverIn order to execute any command, please log in first:teleserver log in --username <username to GUI> --server <IP of the teleserver>You'll be prompted to enter password and afterwards you're logged in!Once logged in, feel free to use API commands.In order to log out execute:teleserver log outAdditional FeaturesServer LookupSometimes it's hard to find teleserver's IP.
It's possible to scan specific network, networks attached to specific interface or all networks in the system.
Withteleserver log lookup_servercommand you can find IP address to your teleserver.
Possible flags:--network- Networks that should be searched for teleserver--interface- Name of the interface to search for networks to lookup.This feature works only for IPv4 addreses.
Package: teleshell
teleshellInstall:pip install teleshellQuick start:importteleshellfromtelethonimportTelegramClient,Buttonusers=[]asyncdefmessage_first(event):users.append(event.chat_id)returnevent.chat_idasyncdefinline_first(event):users.append(event.query.user_id)returnevent.query.user_idclient=TelegramClient('bot',api_id,'api_hash').start(bot_token='token')shell=teleshell.ClientShell(client=client,message_first=message_first,inline_first=inline_first)handle=shell.handleinline=shell.inlinebutton=shell.button@handle(command='start')asyncdeffunc(event,first=None):awaitevent.reply('Started!')@handle(command='help',first=None)asyncdeffunc(event,first=None):awaitevent.reply('Help!')@handle(text=r'he(l)+o',regular=True,lower=True)asyncdeffunc(event,first=None):awaitevent.reply('Hello!')@handle(command='buttons')asyncdeffunc(event,first=None):keyboard=[[Button.inline("First option",b"1"),Button.inline("Second option",b"2")]]awaitevent.reply('OK!',buttons=keyboard)@inline(command='smth',lower=True)asyncdeffunc(event,first=None):awaitclient.send_message(event.query.user_id,'Smth to!')@button(text=b'1')asyncdeffunc(event,first=None):awaitevent.answer('hello')client.run_until_disconnected()Version: 0.0.2
Package: telesign
TeleSign Python SDKTeleSign is a communications platform as a service (CPaaS) company, founded on security. Since 2005, TeleSign has
been a trusted partner to the world’s leading websites and mobile applications, helping secure billions of end-user
accounts. Today, TeleSign’s data-driven, cloud communications platform is changing the way businesses engage with
customers and prevent fraud.For more information about TeleSign, visit ourwebsite.DocumentationCode documentation is included in the SDK. Complete documentation, quick start guides and reference material
for the TeleSign API is available within theTeleSign Developer Center.InstallationTo install the TeleSign Python SDK:$pipinstalltelesignPython2.7+is required for the TeleSign Python SDK.AuthenticationYou will need a Customer ID and API Key in order to use TeleSign’s API. If you already have an account you can retrieve
them from your account dashboard within thePortal. If you have not signed up
yet, sign uphere.DependenciesWe make use of popular, feature-rich and well-tested open-source libraries to perform the underlying functionality of
the SDK. These dependencies are managed by the community accepted package manager. If you are unable to add these
additional third party dependencies to your project we have ensured that the SDK code is easy to read and can serve as
sample code. We have also made sure that more complicated functions such as generate_telesign_headers can be easily
extracted from the SDK and used ‘as is’ in your project.Python Code Example: MessagingHere is a basic code example with the JSON response.from__future__importprint_functionfromtelesign.messagingimportMessagingClientcustomer_id="FFFFFFFF-EEEE-DDDD-1234-AB1234567890"api_key="EXAMPLE----TE8sTgg45yusumoN6BYsBVkh+yRJ5czgsnCehZaOYldPJdmFh6NeX8kunZ2zU1YWaUw/0wV6xfw=="phone_number="phone_number"message="You're scheduled for a dentist appointment at 2:30PM."message_type="ARN"messaging_client=MessagingClient(customer_id,api_key)response=messaging_client.message(phone_number,message,message_type)print(response.json){'reference_id':'DGFDF6E11AB86303ASDFD425BE00000657','status':{'code':103,'description':'Call in progress','updated_on':'2016-12-12T00:39:58.325559Z'}}For more examples, see theexamplesfolder or
visit theTeleSign Developer Center.
Package: telespider
🕸️ Telegram scrapperSimple package (+ CLI) for scrapping Telegram channelFeatures✔️ auto explore new channels✔️ search text✔️ search mentionsUsage$pipinstalltelespider$tspidersearch-w"stonks"-n100# search word `stonks`$tspidersearch-u"andrewsap"-n100# search mentions of user `andrewsap`ConfigurationApp uses this environment variables:API_HASHandAPI_ID- required byPyrogram(more about thathere)ENTRYPOINT_CHANNELS- comma separated list of channels to begin search inMAX_PER_CHANNEL- max number of messages to parse from one channel (can be set with-noption from CLI)AUTO_EXPLORE_CHANNELS- automatically explore new channels and add them to queue for parsing (can be set with--explore\--no-exploreoptions in CLI)SILENT- suppress all output
Package: telesto-base
telesto-baseBase Docker image and tools for telesto.ai models.Instructionstelesto-basecontains a pip-installable Python package and a Docker image, allowing you to
easily package your models for telesto.ai competitions.telesto-base packageTo install the module, you can simply use pip:pip install telesto-baseIf you would like to use the latest not yet released version, you can install the one in thedevelopbranch.pip install git+https://github.com/telesto-ai/telesto-base.git@developThe base imageThe base image contains the pre-installedtelesto-basemodule. Your submissions will use this
as a base, so you'll only have to worry about the algorithms and not the packaging. To use it
locally, you can pull the image from Docker Hub:docker pull telestoai/model-api-base:latestAlternatively, the image can also be built locally with the commanddocker build -t telestoai/model-api-base -f Dockerfile .An example modelIf you are stuck on how to prepare your model for submission, we have prepared a concrete example
for you. The example is available in thetelesto-modelsrepository with further instructions
on the usage.Test classification model APIBuild and start a containerdocker build -t telestoai/model-api-base -f Dockerfile .
docker run -p 9876:9876 --name model-api-base --rm --env USE_FALLBACK_MODEL=1 \
    telestoai/model-api-base classificationSend a sample inputcurl -X POST -H "Content-Type:application/json" --data-binary @tests/data/class/example-input.json -i \
    http://localhost:9876/
...
{
    "predictions": [
        {"probs": {"cat": 0.32015, "dog": 0.67985}, "prediction": "dog"},
        {"probs": {"cat": 0.81545, "dog": 0.18455}, "prediction": "cat"}
    ]
}Test segmentation model APIBuild and start a containerdocker build -t telestoai/model-api-base -f Dockerfile .
docker run -p 9876:9876 --name model-api-base --rm --env USE_FALLBACK_MODEL=1 \
    telestoai/model-api-base segmentationPost a sample inputcurl -X POST -H "Content-Type:application/json" --data-binary @tests/data/segm/example-input.json -i \
    http://localhost:9876/jobs
...
{
    "job_id": "b741bd19767441f6b7abd022744083c9"
}Get the resultcurl -H "Content-Type:application/json" -i http://localhost:9876/jobs/b741bd19767441f6b7abd022744083c9
...
{
    "mask": {
        "content": "<BASE_64_IMAGE>"
    }
}
Package: telesync
Telesync is a lightweight library for programming interactive web applications
entirely in Python (no HTML/Javascript/CSS) required.It is designed to make it fast, fun and easy to build low-latency, realtime,
collaborative, web-based applications. It ships batteries-included with
a suite of form and data visualization components for rapidly prototyping
analytical and decision-support applications.Telesync’s components work in conjunction with the Telesync relay server
that facilitates realtime state synchronization between Python and web browsers.The Telesync relay server is built into H2O.ai Q for enterprise-grade hosting.InstallingInstall and update usingpip:pip install -U telesyncHello worldhello.py:fromtelesyncimportsite,ui# Access the web page at http://localhost:55555/demopage=site['/demo']# Add some content.page['example']=ui.markdown_card(box='1 1 2 2',title='Hello World!',content='And now for something completely different.',)# Save the pagepage.save()Runhello.py:$ python hello.pyLinksWebsite:https://www.h2o.ai/h2o-q/Releases:https://pypi.org/project/telesync/Code:https://github.com/h2oai/telesyncIssue tracker:https://github.com/h2oai/telesync/issuesChange Logv0.1.0AddedExample for displaying iframe content > 2MB.Example for plotting using matplotlib.Example for plotting using Altair.Example for plotting using Vega.Example for plotting using Bokeh.Example for plotting using custom D3.js Javascript.Example for live dashboard with stats cards.Example for master-detail user interfaces usingui.table().Example for authoring multi-step wizard user interfaces.Unload API:q.unload()to delete uploaded files.v0.0.7AddedDownload API:q.download().Vega-lite support:ui.vega_card().Context menu support to all cards.refreshattribute onmeta_cardallows static pages to stop receiving live updates.Passing-debugwhen starting server displays site stats at/_d/site.Drag and drop support for file upload component.Template expression support for markdown cards.All APIs and examples documented.All 110 examples now ship with the Sphinx documentation.Documentation now ships with release download.ChangedAPI consistency:ui.vis()renamed toui.plot().All stats cards now have descriptive names.API consistency:ui.mark.markrenamed toui.mark.type.API consistency:page.sync()andpage.push()renamed topage.save().Removedui.dashboard_card()andui.notebook_card().v0.0.6AddedLog network traffic when logging is set to debug mode.Capture and display unhandled exceptions on the UI.Routing using location hash.Toolbar component.Tabs component.Nav component.Upload API:q.upload().Changedq.sessionrenamed toq.userv0.0.5AddedAdd configure() API to configure environment before launching.v0.0.4AddedMulti-user and multi-client support: launch apps inmulticastorunicastmodes in addition tobroadcastmode.Client-specific data can now be stored and accessed viaq.client, similar toq.sessionandq.app.Simpler page referencing:import sitecan be used instead ofsite = Site().ChangedApps now lauch inunicastmode by default instead ofbroadcastmode.v0.0.3AddedMakeExpandodata structure available for apps.v0.0.2Initial versionv0.0.1Package stub
Package: telethon-asyncpg
Async session for telethonInstallationpip install telethon_asyncpg
# Or with poetry
poetry add telethon_asyncpgUsageimportssl# optionalfromtelethonimportevents,TelegramClientfromtelethon_asyncpgimportAsyncpgSession,installinstall()URI=???# URI-string# dialect+driver://username:password@host:port/databasepgconf=dict(dsn=URI,min_size=5,max_size=5)# to overcome problem with TLS connection to db pass# ssl=ssl.SSLContext(protocol=ssl.PROTOCOL_TLS) to pgconfsession=AsyncpgSession(pgconf,session_id_factory=???)# session_id_factory is any callable with "() -> str" signature# default factory is uuid4 str generator. why factory? (it's not really factory ik)bot=TelegramClient(session=session,api_id=???,api_hash=???)@bot.on(events.NewMessage())asyncdefmessage_handler(message):awaitmessage.reply("Hi!")asyncdefstart():awaitbot.start()print(awaitbot.get_entity("martin_winks"))awaitbot.run_until_disconnected()if__name__=='__main__':importasyncioasyncio.get_event_loop().run_until_complete(start())AsyncpgSessioncan also use shared pool byAsyncpgSession.with_poolinitializer-methodmy_pool=asyncpg.create_pool(...)session=AsyncpgSession.with_pool(my_pool,lambda:"session-id",True)Check out theexamples/folder for more realistic examples.ContributionCurrently we have only asyncpg session available, if you want to contribute with your wrapper - welcome. TakeAsyncpgSessionas an example.For contributorsPatched TelegramClient <-> SessionTelegramClientandSessionobject sharesettings{session.meth: (args_seq, kwargs_mapping)}dictionary. By protocolTelegramClientmust add callable with args and kwargs. By protocol session must call this functions at start as it wants (e.g. pass more arguments such asconnectionobject to session.method)TelegramClientmay callsession.startseveral times per one session instance and session should control its start itself and if it’s already started it shouldn’t start againSession.savemethod is guaranteed to be called as in usual telethonHacking# install poetry dependency manager
# Fork/Fork+Clone && cd {{cloned}}
poetry install
# happy hacking!ReferencesTelethon:hereasyncpg pg-driver:asyncpg
Package: telethon-cosmosdb-sqlsession
Telethon Cosmos DB SQL API SesionThis is aTelethonsession backend which uses Cosmos DB (SQL API).In short, it allows Telethon to store session in Cosmos DB via SQL API.Installingpip3 install telethon-cosmosdb-sqlsessionUpgradingpip3 install -U telethon-cosmosdb-sqlsessionUsagefrom telethon import TelegramClient
from telethoncosmosdb import CosmosDBSQLSession

api_id = 123456
api_hash = "0123456789abcdef0123456789abcdef"
COSMOS_ENDPOINT = 'https://database-endpoint.documents.azure.com:443/'
COSMOS_KEY = 'Cosmos DB key here=='
COSMOS_DBNAME = 'database'

# The first parameter 'user' means the session will create containers with suffix 
# '_user' in the names to avoid any possible name collision (What would happen will happen).
session = CosmosDBSQLSession('user', COSMOS_ENDPOINT, COSMOS_KEY, COSMOS_DBNAME)
client = TelegramClient(session, api_id, api_hash)DisclaimerThis packages assumes your data is well-encrypted in Cosmos DB, and therefore does not encrypt your session data.This package comes with no warranty. I am not responsible for any damages resulted from using this package.
Package: telethon-cryptg
Moduletelethon-tgcryptobrings better performance toTelethonlib.InstallationN.B.you must not havecryptginstalled, because it interferes with
this module.To install this module and patch your Telethon installation just run:pip install telethon-tgcryptoCredits@painorfor making this module@andrewfor writing this readme@tulirfor the basic implementation@lonami&contributorsfor makingtelethonunknowndeveloperfor the fast crypto module