Saravanan666/pypi-org huggingface dataset:
Package: clickhouse-repl
clickhouse-replA toolkit for running ClickHouse queries interactively, leveraging the perks of an ipython consoleInstallationUse the package managerpipto install clickhouse-repl.pipinstallclickhouse-replUsage$ clickhouse-repl --help             
Usage: clickhouse-repl [OPTIONS]

  A toolkit for running ClickHouse queries interactively,  leveraging the
  perks of an ipython console.

  You can also set options with environment variables by using this format:
  CLICKHOUSE_REPL_<OPTION>

  Once in, run_query() will be your friend to execute queries.

Options:
  --host TEXT      Hostname or IP  [default: localhost]
  --port INTEGER   Native port  [default: 9000]
  --user TEXT      The ClickHouse user  [default: default]
  --password TEXT  Will be prompted. You can also set the environment variable
                   CLICKHOUSE_REPL_PASSWORD  [required]

  --database TEXT  The database we gonna use  [default: default]
  --help           Show this message and exit.ConnectingPassword promptedIf no environment variable is set, password will be prompted.$clickhouse-repl
Password:Welcometoclickhouse-repl1.0.0onPython3.7.2,IPython7.19.0
Connectedtolocalhost:9000,clickhouser-serverversion20.12.5Password providedThis is not considered secure since passwords ends up persisted on.bash_history, for example.Avoid this one!$clickhouse-repl--passwordv3ryh4rdp4sswordDepending on the shell and settings in place, it is possible to bypass the recording to history by prefixing the command with double spacePassword from Environment VariableYou may setCLICKHOUSE_REPL_PASSWORDon your.bashrc/.zshrc/.bash_profile.$exportCLICKHOUSE_REPL_PASSWORD=v3ryh4rdp4ssword
$clickhouse-replAlternatively:$envCLICKHOUSE_REPL_PASSWORD=v3ryh4rdp4sswordclickhouse-replConnecting to specific databaseSpecify the database name and your session will start automatically from it.Useful when your tables are somewhere else other than the ClickHouse default's database and you don't want to specify the database every time on your queries.$ clickhouse-repl --database mydatabaseRunning QueriesUsingrun_queries$ clickhouse-repl
Password: 
Welcome to clickhouse-repl 1.0.0 on Python 3.7.2, IPython 7.19.0
Connected to localhost:9000, clickhouser-server version 20.12.5
In [1]: run_query('select now64()')
Out[1]: [(datetime.datetime(2021, 1, 19, 0, 41, 7, 216000),)]

In [2]:Usingclient/cThese are shortcuts toclickhouse_driver.Clientinstance, initiated when a clickhouse-repl session is started.You may use it for whatever purpose you may find.To run queries with it you need to callc.execute()/client.execute()instead ofrun_query(). The later is in fact just a idiomatic shortcut pointing to the first.ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.LicenseMIT
Package: clickhouse-sqlalchemy
ClickHouse SQLAlchemyClickHouse dialect for SQLAlchemy toClickHouse database.DocumentationDocumentation is available athttps://clickhouse-sqlalchemy.readthedocs.io.UsageSupported interfaces:native[recommended] (TCP) viaclickhouse-driver <https://github.com/mymarilyn/clickhouse-driver>async native(TCP) viaasynch <https://github.com/long2ice/asynch>httpvia requestsDefine tablefromsqlalchemyimportcreate_engine,Column,MetaDatafromclickhouse_sqlalchemyimport(Table,make_session,get_declarative_base,types,engines)uri='clickhouse+native://localhost/default'engine=create_engine(uri)session=make_session(engine)metadata=MetaData(bind=engine)Base=get_declarative_base(metadata=metadata)classRate(Base):day=Column(types.Date,primary_key=True)value=Column(types.Int32)__table_args__=(engines.Memory(),)Rate.__table__.create()Insert some datafromdatetimeimportdate,timedeltafromsqlalchemyimportfunctoday=date.today()rates=[{'day':today-timedelta(i),'value':200-i}foriinrange(100)]And query inserted datasession.execute(Rate.__table__.insert(),rates)session.query(func.count(Rate.day))\.filter(Rate.day>today-timedelta(20))\.scalar()LicenseClickHouse SQLAlchemy is distributed under theMIT license.
Package: clickhouse-table-exporter
Clickhouse table exporterProvided metricsExample outputHow to installDockerPython module from pypiHow to runDockerBare pythonWhat is next?Dev envHow to setupDependenciesRoadmapCreditsClickhouse table exporterA Python exporter for collecting clickhouse tables sizes.Provided metricsAll metrics have two default labes: database and table.clickhouse_table_exporter_table_size - size in bytesclickhouse_table_exporter_table_rows - rows in tableclickhouse_table_exporter_table_days - difference between max_time and min_time of a tableclickhouse_table_exporter_table_avg_day_size - size / the differenceExample output$  curl -s 127.0.0.1:9001/ | egrep '^clickhouse_table_exporter_table.*foo'
clickhouse_table_exporter_table_size{database="foo",table="t1"} 71394.0
clickhouse_table_exporter_table_size{database="foo",table="t2"} 23827.0
clickhouse_table_exporter_table_rows{database="foo",table="t1"} 300.0
clickhouse_table_exporter_table_rows{database="foo",table="t2"} 100.0
clickhouse_table_exporter_table_days{database="foo",table="t1"} 11.0
clickhouse_table_exporter_table_days{database="foo",table="t2"} 11.0
clickhouse_table_exporter_table_avg_day_size{database="foo",table="t1"} 6237.17527149184
clickhouse_table_exporter_table_avg_day_size{database="foo",table="t2"} 2072.2592542634943How to installDocker$ docker pull alexeyantropov/clickhouse-table-exporterPython module from pypi$ python3 -m pip install clickhouse-table-exporterHow to runDocker$ docker run -t -i -p 9001:9001 \
    --env CLICKHOUSE_HOST=192.168.50.120 --env CLICKHOUSE_PORT=8123 \
    --env CLICKHOUSE_USER=my_exporter --env CLICKHOUSE_PASS=your_exporter \
    clickhouse-table-exporterBare pythonE.g. for rpm packages$ python3 /.../site-packages/exporter.pyWhat is next?Now the exporter is ready to scrape by Promethus.Dev env$ CH_TE_DEBUG=1 ./develop/run.shHow to setupAll configuration is provided by environment variablesCH_TE_POLL_INTERVAL - polling interval in seconds (default: 10)CH_TE_PORT - exporter port (default: 9001)CH_TE_DEBUG - enable debug loggingCLICKHOUSE_HOST - a clickhouse instence hostCLICKHOUSE_PORT - a clickhouse instence port, http portCLICKHOUSE_USER - user (is optionable)CLICKHOUSE_PASS - password (is optionable)Dependenciesclickhouse_connectprometheus_clientRoadmapGithub releasesCreditsThx for all cool guys and gals in this threadhttps://gist.github.com/sanchezzzhak/511fd140e8809857f8f1d84ddb937015How to write an exporter on Pythonhttps://trstringer.com/quick-and-easy-prometheus-exporter/Clickhouse connectorhttps://clickhouse.com/docs/en/integrations/pythonHow to deploy a Python packagehttps://packaging.python.org/en/latest/tutorials/packaging-projects/
Package: clickhouse-tools
clickhouse-toolsclickhouse-toolsis a set of tools for administration and diagnostics ofClickHouseDBMS.Toolsclickhouse-toolsconsist of following components:chadmin- ClickHouse administration toolch-monitoring- ClickHouse monitoring toolkeeper-monitoring- ClickHouse Keeper / ZooKeeper monitoring toolch-s3-credentials- ClickHouse S3 credentials management toolAll of these tools must be run on the same host as ClickHouse server is running.Local development (using poetry)sudomakeinstall-poetry# or to install in user's home directorymakePOETRY_HOME=~/opt/poetryinstall-poetry# lintmakelint# unit testsmaketest-unit
maketest-unitPYTEST_ARGS="-k test_name"# integration tests (rebuild docker images using a .whl file)maketest-integration
maketest-integrationBEHAVE_ARGS="-i feature_name"# integration tests (supply a custom ClickHouse version to test against)CLICKHOUSE_VERSION="1.2.3.4"maketest-integration# If you want to have containers running on failure, supply a flag:# BEHAVE_ARGS="-D no_stop_on_fail"# For building deb packagesmakeprepare-build-deb
makebuild-deb-packagePlease note: base images for tests are pulled fromchtools Dockerhub.
If you want to build base images locally, rundockerbuildxbake-ftests/bake.hclIf you want to build base images for multiple versions of ClickHouse, run:CLICKHOUSE_VERSIONS='1.2.3.4, 5.6.7.8, latest'dockerbuildxbake-ftests/bake.hcl
Package: clicking
Convenience wrapper forClick.Free software: MIT licenseInstallation(.venv)>pip install clickingUsageEchoConvenience functions forclick.echobecause it’s a pain to remember the
color and naming convention I myself use before.infoPrint message in bold white.progressPrint message in bold blue.workingPrint message in bold cyan.successPrint message in bold green.warningPrint message in bold yellow.failPrint message in bold red.importclickingclicking.info('Hello world!')StyleConvenience functions forclick.styledue to the same above reason.infoText in bold white.progressText in bold blue.workingText in bold cyan.successText in bold green.warningText in bold yellow.failText in bold red.importclickingprint(clicking.style.info('Hello world!'))ExceptionErrorPrint message in bold red and exit.importclickingraiseclicking.Error('Something broke!')GroupColorized custom class forclick.group.importclickimportclicking@click.group(cls=clicking.Group)defgroup():passCommandColorized custom class forclick.command.importclickimportclicking@click.command(cls=clicking.Command)defcommand():passHistory0.2.0Add style module.Add colorized Group and Command.0.1.1Add exception that print message in bold red when raised.0.1.0First public release.
Package: clickjacking-poc
Clickjacking POCA Python package for creating a clickjacking proof of concept (POC).RequirementsPython 3.6 or newerGoogle Chrome installed on the systemWrite permissions for the current directory for the user running the scriptInstallationInstall using pip:pip install clickjacking-pocUsageRun the script with the following command:clickjacking-poc <URL> [-p <port>]Arguments<URL>The URL of the page to be displayed in the clickjacking POC.-p <port>(Optional) The port number to use for the temporary web server. If not specified, the default port is 80.Exampleclickjacking-poc https://example.com/loginclickjacking-poc https://example.com/login -p 8000LicenseThe scripts and documentation in this project are released under theMIT License.
Package: click-keyring
click-keyringclick-keyringprovides a customizedclickpassword option decorator to store and retrieve credentials usingkeyring.When a command is decorated withclick-keyring:click-keyringgenerates a keyring service name using the command name by default (this can be customized).click-keyringuses the service name to look up an existing password using keyring.If an existing password is found, it is used as the param value.If not found, the user is prompted to enter a password.The new password is then saved to the keyring backend.Installationpipinstallclick-keyringExampleSee the examples folder for additional examples.importclickfromclick_keyringimportkeyring_option@keyring_option('-p','--password')@click.option('-u','--username',prompt='Username')@click.command()defsimple_cmd(username,password):"""Example of click_keyring using defaults.The password will be saved to keyring with service namematching the click command name (in this case "simple_cmd").This can be overridden by setting `prefix` and/or `keyring_option`on the decorator."""click.echo()click.echo('** Command Params. User:{}, Password:{}'.format(username,password))if__name__=='__main__':simple_cmd()When executed the first time, both username and password will be prompted.~/g/c/examplespython./simple.py
Username:testuser
Password:

**CommandParams.User:testuser,Password:testpw
~/g/c/examplesSubsequent executions using the same username will retrieve the password from the keyring backend.~/g/c/examplespython./simple.py
Username:testuser

**CommandParams.User:testuser,Password:testpw
~/g/c/examplesService NamesBy default, the value of theclick.Command.nameattribute is used as the service name.The name is based on the function name or, if provided, the name argument on the@click.commanddecorator.@keyring_option('-p','--password')@click.option('-u','--username',prompt='Username')@click.command()defsimple_cmd(username,password):# service name will be the value of `simple_cmd.name`# This will likely be "simple-cmd" as click replaces underscores with hyphens.passA custom service name can be specified using theprefixargument.@keyring_option('-p','--password',prefix='customnservice')@click.option('-u','--username',prompt='Username')@click.command()defsimple_cmd(username,password):# service name will be "customnservice"passOther options on the command can be included in the service name using theother_optionsargument.
This is an iterable of option names.  The values provided for those options is appended to the service name.@keyring_option('-p','--password',prefix='customnservice',other_options=('hostname',))@click.option('-n','--hostname')@click.option('-u','--username',prompt='Username')@click.command()defsimple_cmd(username,hostname,password):# service name will be "customnservice_[value provided for hostname]"pass
Package: click-lazy
click-lazy$ click_lazyClick lazy is an extention forclick.Click lazy allow you to separate set of commands in file and import it only if necessary.A Simple Examplefromclick_lazyimportLazyGroup...if__name__=='__main__':# This group of commands will import group_heavy only if neededcli.add_command(LazyGroup(name='heavy',import_name='group_heavy:cli'))cli()group_heavy.pyimportclick@click.group()defcli():"""Havy script"""@cli.command(name='heavy_cmd')defrun_heavy_cmd():print('Running command from heavy group file')See complete example on githubLinksclick-lazy on PyPiclick-lazy source codeclick documentation
Package: clickloader
Click Command Loader (CCL)Click Command Loader (Referred as CCL) is an additional package forClicktoload Click commands from a folder.As such, by having the following folder structure:my_project/
├─ commands/
│  ├─ create.py
│  ├─ delete.py
│  ├─ list.py
├─ __init__.pyThe commandscreate,deleteandlistwill be registered in your Click app!InstallationI'm a package that is available onPyPi!With PippipinstallclickloaderWith PoetrypoetryaddclickloaderExampleLet's consider you have the following commands structure:my_project/
├─ commands/
│  ├─ create.py
│  ├─ delete.py
│  ├─ list.py
├─ cli.pyInside yourcli.py, you should have your base logic for your CLI app.
Originally, this is where all your commands would be registered, but CCL will help you leverage the work here.Here's is what the content of thecli.pywould be:importclickimportcclimportpathlibpath_to_commands=pathlib.Path(__file__,"..","commands")my_cli=click.Group("MyCLI")ccl.register_commands(my_cli,path_to_commands)if__name__=="__main__":my_cli()And voilà! All commands inside your "commands" folder have been registered!Behind the sceneWhen registering commands, CCL will do the following:List files and folder inside the given source.Iterate over directory, if a file is found, go to step 3, if a folder is found, go to step 2.12.1. If folder, see if a__init__.pyexist, if it exist, attempt to export a function that contains a click decorator(MUST BE A GROUP). If not found, create a click group, then continue to step 3 using the indicated group.If file, attempt to export a function that contains a click decorator(MUST BE A COMMAND), then add it to the given group.Continue until all files/folder have been scanned.
Package: click-lock
Adds locks and timeouts toClickentrypoints.There is only one decoratorclick_lock.lockwhich can be applied
to click commands and groups:# example.pyimporttimeimportclickimportclick_lock@click.command()@click_lock.lockdefcmd():time.sleep(10)cmd()Now you have some additional options:Usage: example.py [OPTIONS]

Options:
  --lock fname          Path to lock file
  --timeout seconds     Limit script execution time
  --trace / --no-trace  Log traceback in case of timeout  [default: True]
  --help                Show this message and exit.For example, lock script execution:python example.py --lock /tmp/example.lckLimit script execution time:python example.py --timeout 1
Package: click-loglevel
GitHub|PyPI|Issues|Changelogclick-loglevelprovides aLogLevelparameter type for use inClickprograms that wish to let the user set the logging level.  It accepts all of
thelogginglog level names (CRITICAL,ERROR,WARNING,INFO,DEBUG, andNOTSET, all case insensitive), and converts them
into their corresponding numeric values.  It also accepts integer values and
leaves them as-is.  Custom log levels are also supported.Starting in version 0.4.0, shell completion of log level names (both built-in
and custom) is also supported.Installationclick-loglevelrequires Python 3.7 or higher.  Just usepipfor Python 3 (You have pip, right?) to install it:python3 -m pip install click-loglevelExamplesmyscript.py:importloggingimportclickfromclick_loglevelimportLogLevel@click.command()@click.option("-l","--log-level",type=LogLevel(),default="INFO",help="Set logging level",show_default=True,)defmain(log_level:int)->None:logging.basicConfig(format="[%(levelname)-8s]%(message)s",level=log_level,)logging.log(log_level,"Log level set to%r",log_level)if__name__=="__main__":main()Runningmyscript.py:$python3myscript.py[INFO    ] Log level set to 20$python3myscript.py--log-levelDEBUG[DEBUG   ] Log level set to 10$python3myscript.py--log-levelerror[ERROR   ] Log level set to 40$python3myscript.py--log-level15[Level 15] Log level set to 15Script with custom log levels:importloggingimportclickfromclick_loglevelimportLogLevellogging.addLevelName(15,"VERBOSE")logging.addLevelName(25,"NOTICE")@click.command()@click.option("-l","--log-level",type=LogLevel(extra=["VERBOSE","NOTICE"]),default="INFO",help="Set logging level",show_default=True,)defmain(log_level:int)->None:logging.basicConfig(format="[%(levelname)-8s]%(message)s",level=log_level,)logging.log(log_level,"Log level set to%r",log_level)if__name__=="__main__":main()APITheclick_loglevelmodule contains a single class:LogLevelA subclass ofclick.ParamTypethat accepts the standard logging level names
(case insensitive) and converts them to their corresponding numeric values.  It
also accepts integer values and leaves them as-is.Custom log levels can be added by passing them as theextraargument to the
constructor.extracan be either an iterable of level names (in which case
the levels must have already been defined — typically at the module level — by
callinglogging.addLevelName()) or a mapping from level names to their
corresponding values.  All custom log levels will be recognized case
insensitively; if two different level names differ only in case, the result is
undefined.
Package: clickme
IntroductionThis package helps to integrateclick.uzand your application is built ondjango.InstallationUse the package managerpipto install.pipinstallrequests
pipinstalldjangorestframework
pipinstallclickmeUsage# settings.pyINSTALLED_APPS=[...'clickme','rest_framework',...]CLICKME_SETTINGS={'ENDPOINT':'https://api.click.uz/v2/merchant/','MERCHANT_ID':'','SERVICE_ID':'','MERCHANT_USER_ID':'','SECRET_KEY':'',}# urls.pyurlpatterns=[...path('api/clickme/',include('clickme.urls'))]Get startedpythonmanage.pymigrate
pythonmanage.pyrunserverSo now we have new API endpoint, which is/api/clickme/.Documentationdocs.click.uzdjango-rest-frameworkdocs
Package: clicknium
IntroductionClicknium Python package provides methods to automate various types of applications in Windows, such as Web browsers, Windows Desktop applications, Java applications and SAP Windows GUI app, etc.No need to learn XPath or selector knowledge in advance;Capture UI locators by just clicking UI controls with VS Code extension;Same API for web and desktop applications;InstallClicknium Visual Studio Code Extensionto start automation with Clicknium Python package now.ExamplesWeb browser Automation. visitQuick startand learn how to capture locators inVisual Studio Code.fromclickniumimportclickniumascc,locator,uitab=cc.edge.open("https://www.bing.com/")tab.find_element(locator.new_store.bing.search_sb_form_q).set_text('clicknium')tab.find_element(locator.new_store.bing.svg).click()result_elements=tab.find_elements(locator.new_store.bing.a_search_result)foreleminresult_elements:print(elem.get_text())elem.highlight(duration=1)tab.close()Automate 'notepad' on Windows using the same way with web browser:fromclickniumimportclickniumascc,locator,uiimportsubprocessprocess=subprocess.Popen("notepad")ui(locator.new_store.notepad.document_15).set_text("clicknium")ui(locator.new_store.notepad.document_15).clear_text('set-text')process.kill()MoreDocumentation: Learn everything about ClickniumAPI Reference: Learn the Python APIsExplore more inClicknium.comMore samples inGitHubContactEmail:clicknium@clicknium.com
Package: click-noexit
click-noexitA utility for the Click command-line interface library that prevents commands from exiting the application directly. Instead, it allows commands to return exit codes for improved control and handling in larger applications.Introductionclick-noexitis a decorator for Click commands designed to suppress the default behavior of exiting the application upon command completion or when an error occurs. This is particularly useful when integrating Click commands into larger applications, where you want to handle exits and exceptions more gracefully.InstallationInstallclick-noexitusing pip:pipinstallclick-noexitOr, if you are using Poetry:poetryaddclick-noexitEnsure that you have Click version 8.0.0 or newer.InstallationImport and use thenoexitdecorator to wrap your Click commands:importclickimportclick_noexit@click_noexit.noexit()@click.command()defmy_command():# Command logic herepassThe noexit decorator can be used without any additional arguments. It modifies the behavior of the Click command to prevent the application from exiting and allows the command to return exit codes instead.ExamplesBasic Command@click_noexit.noexit()@click.command()defhello()->None:click.echo("Hello, World!")Command with Exit Code@noexit()@click.command()defgoodbye():click.echo("Goodbye!")return42ContributingContributions are welcome! If you have a feature request, bug report, or a pull request, please feel free to open an issue or a pull request on the project repository.Licenseclick-noexit is released under the MIT License. See the LICENSE file for more details.
Package: clickntrack
Multi-domain permalink management engine.
-Click’n’Trackprovides simple REST API to managepermalinkswith multi-domain web hosts capabilities.Every permalink is defined by a hostname and a single path segment and a target URL. Hostname and path segment compose the permalink URL regardless the protocol scheme.For instance, using the default hostname from domainmydomain.ioandclickntrackyou can compose permalink URLshttp:\mydomain.io\clickntrackorhttps:\mydomain.io\clickntrackdepending on the web host configuration.When activating a permalink,Click’n’Trackengine lookups at the database to retrieve the target URL, store few‘hit’data et redirect the HTTP client to the target URL using anHTTP 302response.For every‘hit’,Click’n’Trackgrabs some basics data like the timestamp, theuser-agent, therefererand  the remote address of the client.DISCLAIMERClick’n’Trackis not an enterprise class application: You run it in production at your own risk.Click’n’Trackis a sandbox project, I develop to learnPythonprogramming and to discoverMongoDBcapabilities.REST APITODO: Coming soon !INSTALLATION NOTESSoftware requirementsMongoDBdatabasePython3.5+ runtime with dependencies onPyMongoBottle frameworkMonkey IoCMonkey DAO PyMongoSetup recommendationsAs MongoDB engine, we recommend to use theMongoBD Atlasplatform.UnlessClick’n’Trackcan run standalone, we recommend to the application aWSGIcompliant web server likeApache HTTP serveron a Linux server. When hostingClick’n’Trackon anApache HTTP server, it is required to enablemod_wsgi.ConfigurationTODO: Coming soon !RunningClick’n’TrackstandaloneTODO: Coming soon !
Package: click-pacbar
Click PacbarHelper method to turn the click.progressbar into a Pacman!Free software: MIT licenseFeaturesSame interface asclick.progressbar(http://click.pocoo.org/6/utils/#showing-progress-bars), just usepacbar.Made mostly for my personal use, so use at your own risk. Enjoy!importtimefrompacbarimportpacbarwithpacbar(range(10))asbar:forxinbar:time.sleep(1)CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2018-07-06)First release on PyPI.