Saravanan666/pypi-org huggingface dataset:
Package: ks33requests
ks33requests概述一个很简单的、适用于金山云对象存储(KS3)的Python3 客户端。金山云官方提供了KS3的PythonSDK，但在我启动这个项目(2019-06-10)时，仅提供Python2 SDK。考虑到Python2 已经接近其生命周期的终点，我制作了这个简单的Python3KS3客户端用于相关项目。安装pip安装pipinstallks33requests源代码安装pythonsetuptools.pyinstallPipenv安装pipenvinstallks33requests如何使用参见notebooks中的笔记CHANGELOG0.1.3📅 Date: 2019-06-26New:get_content_md5(): 获取 KS3 样式的 MD5 BASE64 校验值Fix:修订conda与pip的定义文件中的几处错误修订几处文档错误0.1.2.1📅 Date: 2019-06-25Change:构造Client时，如果不指定密钥对，将从环境变量KSYUN_ACCESS_KEY与KSYUN_SECRET_KEY获得Client.send()增加encoding参数，用于对文本数据上传的支持Fix:几个有关文本数据上传 bugNew:几个测试用例Sphinx DocsCircle CICode coverage0.1📅 Date: 2019-06-12这实际上还是一个 Alpha 版本，但是为了在项目中顺利使用，且给它一个稳定的版本编号。CONTRIBUTINGℹ注意:这个项目需要Python3.5及以上版本。复刻项目代码复刻项目代码到工作目录，然后切换到项目的目录：cdpath/to/your/workspace/directory/
gitclonehttps://github.com/tanbro/ks33requests.gitcdks33requests准备开发环境强烈建议在virtual environment中进行开发工作。如果使用标准库:使用标准库的venv与pip直接新建名为venv的虚拟环境目录，将本项目以“开发模式”安装到这个环境，并安装开发工作所要使用的包：path/of/your/python-mvenvvenv
venv/bin/pythonsetup.pydevelop
venv/bin/python-mpipinstall-rrequires/dev.txt如果使用Pipenv:使用Pipenv命令直接安装:pipenvinstall--dev如果使用conda使用conda从配置文件新建一个专用于这个项目的、名为ks33requests-dev的环境，然后激活它，将本项目以“开发模式”安装到这个环境：condaenvcreate-fenvironment.yml
condaactivateks33requests-dev
pythonsetup.pydevelopXML Schema金山云KS3的 WebAPI 数据结构有许多与S3兼容。
所以，这个项目直接使用考虑来自http://s3.amazonaws.com/doc/2006-03-01/AmazonS3.xsd的 Schema。我们使用generateDS工具，从xsd文件生成Python类型定义：mkdir-pschemas
wgethttp://s3.amazonaws.com/doc/2006-03-01/AmazonS3.xsd-Pschemas
generateDS.py-f-os3_api.py-ss3_sub.py--super=s3_apischemas/AmazonS3.xsd生成的源代码文件复制到名称空间ks33requests.schemas中，小幅修改s3_sub.py即可使用。运行测试用例pythonsetup.pytest测试用例很少，陆续补充中...Docs如果模块有增减，需要删除原来的Sphinx-DocsAPI 自动文档并重新生成:rm-rfdocs/ks3requests.rstdocs/api
sphinx-apidoc-e-f-odocs/apisrc/ks33requestssrc/ks33requests/schemas/s3_*.pyAUTHORSLiu Xue Yan (liu_xue_yan@foxmail.com)
Package: ks3sdk
KS3 SDK for python使用指南安装安装python sdk在线安装pip install ks3sdk本地安装通过git下载SDK到本地，或者下载zip包后解压git clone https://gitee.com/ks3sdk/ks3-python-sdk.git进入ks3-python-sdk目录，安装SDKcd ks3-python-sdk
python setup.py install初始化from ks3.connection import Connection
ak = 'YOUR_ACCESS_KEY'
sk = 'YOUR_SECRET_KEY'
c = Connection(ak, sk, host='YOUR_REGION_ENDPOINT', is_secure=False, domain_mode=False,timeout = 1)常用参数说明ak：金山云提供的ACCESS KEY IDsk：金山云提供的SECRET KEY IDhost：金山云提供的各个Region的域名（例
ks3-cn-beijing.ksyuncs.com）,具体定义可参考API接口文档-Region(区域)is_secure：是否通过HTTPS协议访问Ks3，True:启用 False:关闭domain_mode：是否使用自定义域名访问Ks3（host填写自定义域名），True:是 False:否timeout：设置超时时间 ,默认10秒  单位:秒运行环境适用于2.6、2.7、3.3、3.4、3.5、3.6、3.7的Python版本推荐用3.5以上版本更多文档快速入门详细使用文档加密上传多线程分块上传下载金山云Python SDK文档
Package: ksalf
ksalfA lightweight experimental HTTP handler inspired by flask.! This is just a experimental (fun) project, please don't use it in production !ImplemtationKsalf is a lightweight handler for thepython (base) http server.It provides new feature likeURL parsing and HTML responses, to the python in-build http server.Ksalf currently only supportsGETrequests.The project was inspired by theflask python project.Installtionpip install ksalfExamplefrom http.server import HTTPServer
from ksalf import HTTPHandler

class Handler(HTTPHandler):

    @HTTPHandler.route("/health")
    def GET(self):
        self.respond(b'healthy')

if __name__ == "__main__":
    PORT = 8080
    httpd = HTTPServer(('0.0.0.0', PORT), Handler)
    print("Server running on http://localhost:" + str(PORT))
    httpd.serve_forever()This example would serve a simple web app on your localhost:8080.You can register a route with @HTTPHandler.route("/<your_route>").GETrequests always get processed by thedef GET(self):implementation.curlcurl localhost:8080/healthResponsehealthyFuture DevelopmentImplement testsSupport other request methods than justGETAdvanced URL parsingEnhance HTML Responses
Package: ksalib
KSA libraryA library enabling developers to easily build simple and complicated programs for use in KSAcurrently under constructionAuthorizationAuthorization expires after a few dozen minutes. Refresh Login Every few minutes to avoid errors.This library supports lms, student site, and gaonnuri. For more support, create an issue.To Authorizeuser=Auth()
user.gaonnuri_auth('id','pwd')
user.student_auth('id','pwd')
user.lms_auth('id','pwd')Post ClassThe Post class is a class that represents an individual gaonnuri post. In takes an authorization class as an input. You can use it in the following way.post=Post(user, link of post)There are many attributes of aPostclasspost.title
post.time
post.author
post.viewsYou can print the article in two forms in the following way. Thehtmlform, andmarkdown( just text ) form.post.html()
post.text()both return a string.Sugang ClassSugangclass is a class that represents your 수강상태. It takes an authorization class as an input. You can use it in the following way.sugang=Sugang(user)It has three methods.sugang.tablereturns your classes as a listsugang.timetablereturns your classes as a listsugang.inforeturns information about you (ex : your grade, number, et cetra)Exploit ClassExploitclass is a class that enables users to do actions that are supposed to be blocked. It takes an authorization class as an input. You can use it in the following wayexploit=Exploit(user)It currently has three methods.exploit.outing()외출 외박 신청이 되있을때 외출 체크를 할 수 있게 해줌exploit.lmsview(number)takes integer as a input. enables users to see other people's posts corresponding to the integer on lms.exploit.lmsfile(number,path)takes integer and download path as input. enables user to download other people's posts corresponding to the integer on lms.MethodsAcessing the BoardThere are two main ways to access a board. One returns a list ofPostclasses, and the other returns only basic informaion about each post.1. To get a list ofPostclasses, useget_gaonnuri_board_post(user,board="board name")2. To access the basic information about a post, useget_gaonnuri_board(user,board="board name")The"board name"has to be one on gaonnuri, for example"board_notice"or"board_SuQZ12".
This will return each notice in the following json format.{
  'no':no,
  'title':title,
  'link':link,
  'author':author,
  'time':time,
  'views':views
  }All posts will be appended to a list.To access the one-line post, useget_gaonnuri_oneline(user)This method will return a list of all gaonnuri one-line postsAcessing 상점, 벌점To access 상점, 벌점, use the following method.get_student_points(user)The method takes an authorization class as an input. It returns the 상점, 벌점 as a dictionary.
Package: k-SchoolMeal
🍞 K-School Mealk-급식다운python3 -m pip install k-SchoolMeal함수School code# ex-1KSchoolMeal.school_code('분당중학교')# ex-2KSchoolMeal.school_code('광문고등학교','서울특별시')paramtypedescriptionschool_namestrschool nameregion_nameoptional<str>add region in parameters will increase more accuracySchool_meal# exKSchoolMeal.school_meal('B10','123456','2021.12.01')paramtypedescriptionregion_codestrregion codeschool_codestrschool codedatestrthe day of you want to get data예시#분당중학교#asyncasyncdefmain():school_info=awaitKSchoolMeal.school_code('분당중학교')meal=awaitKSchoolMeal.school_meal(school_info.region_code,school_info.school_code,'2021.11.01')#-> List[SchoolMealInfo]#syncdefmain():school_info=KSchoolMeal.sync.school_code('분당중학교')meal=KSchoolMeal.sync.school_meal(school_info.region_code,school_info.school_code,'2021.11.01')#-> List[SchoolMealInfo]#sync [detail]defmain():school_info=KSchoolMeal.sync.school_code('광문고','서울특별시')# add region in parameters will increase more accuracymeal=KSchoolMeal.sync.school_meal(school_info.region_code,school_info.school_code,'2021.11.01')#-> List[SchoolMealInfo]정보응답 정보classSchoolMealInfo:# 급식 정보region_code:str#시도교육청코드region_office_name:str#시도교육청명school_code:str#표준학교코드school_name:str#학교명meal_code:str#식사코드meal_type:str#식사명date:str#급식일자person_number:int#급식인원수dish:list[str]#요리명origin_info:list[str]#원산지정보calorie:str#칼로리정보nutrients:dict[str,float]#영양정보#예시nutrients={'탄수화물(g)':104.3,'단백질(g)':35.8,'지방(g)':18.7,'비타민A(R.E)':285.8,'티아민(mg)':0.4,'리보플라빈(mg)':0.6,'비타민C(mg)':22.5,'칼슘(mg)':220.0,'철분(mg)':3.9}classSchoolInfo:# 학교 정보region_code:str#시도교육청코드region_office_name:str#시도교육청명school_code:str#표준학교코드school_name:str#학교명school_level:str#학교종류명location_name:str#소재지명foundation_type:str#설립명(ex: 사립, 공립)address:str#도로명주소tel:str#전화번호homepage:str#홈페이지주소coeducation:str#남녀공학구분명school_type:str#고등학교구분명school_anniversary:str#개교기념일
Package: ksconf
Ksconf Splunk CONFiguration toolThis utility handles common Splunk app maintenance tasks in an installable python package.
Specifically, this tool deals with many of the nuances of storing Splunk apps in a
version control system like git and pointing live Splunk apps to a working tree. Merging changes
from the live system's (local) folder to the version controlled (default) folder and dealing with
more than one layer of "default" are all supported tasks which are not native to Splunk.
Tasks like creating new Splunk apps from your local system while merging the 'local' folder into
'default' is also supported.Earlier version of this project were packaged askintyre-splunk-confprior to v0.10.0Install withpip install ksconfConfirm installation with the following command:ksconf --versionTo get an overview of all the CLI commands, run:ksconf --helpHelp on specific command, such as 'unarchive', run:ksconf unarchive --helpPlease see theOfficial docsfor more info.
Package: ksconf-jinja-markdown
ksconf-jinja-markdownAdd Markdown rendering support to the Ksconf packing ecosystem.
This allows rendering markdown into html when using Jinja (*.j2) files within
a rendered Splunk app using theksconf packagecommand.Jinja filtermarkdown2html- Filter used to convert markdown text into HTML output.Installpipinstall-Uksconf-jinja2-markdownInstallation can be validated by running:ksconf --versionExample UsageSimple XML with an inputContents ofmy_app/default/data/view/my_dashboard.xml.j2:<dashboard><row><html>{{description|markdown2html}}</html></row></dashboard>Contents ofinputs.json:{"description":"# Title\n## Header 2\n* bulleted\n* list\n"}ksconfpackage--enable-handler=jinja--template_vars@inputs.confmy_appRelease stepspythonsetup.pybuild
pythonsetup.pybdist_wheelsdist
twineuploaddist/ksconf_jinja_markdown-*any.whldist/ksconf-jinja-markdown-*.tar.gz
Package: kscorer
KScorer: Auto-select optimal K-means clusters with advanced scoringBasic UsageLoad ModulesIn[1]:importnumpyasnp...:importpandasaspd...:fromsklearnimportdatasets...:fromsklearn.metricsimportbalanced_accuracy_score...:fromsklearn.model_selectionimporttrain_test_split...:fromkscorer.kscorerimportKScorerInit KScorerIn[2]:ks=KScorer()Get DataIn[3]:X,y=datasets.load_digits(return_X_y=True)...:X.shapeOut[3]:(1797,64)Train/Test SplitIn[4]:X_train,X_test,y_train,y_test=train_test_split(...:X,y,test_size=0.2,random_state=1234)Fit KScorer (i.e. Perform Unsupervised Clustering)In[5]:labels,centroids,_=ks.fit_predict(X_train,retall=True)100%|██████████|13/13[00:09<00:00,1.39it/s]Optimal ClustersIn[6]:ks.show()In[7]:ks.optimal_Out[7]:10Confusion MatrixIn[8]:labels_mtx=(pd.Series(y_train)...:.groupby([labels,y_train])...:.count()...:.unstack()...:.fillna(0))...:# match arbitrary labely to ground-truth labels...:order=[]...:...:fori,rinlabels_mtx.iterrows():...:left=[xforxinnp.unique(y_train)ifxnotinorder]...:order.append(r.iloc[left].idxmax())...:...:confusion_mtx=labels_mtx[order]...:confusion_mtx59420617830124.05.01.00.00.00.02.07.04.02.0112.095.00.00.00.00.00.00.09.090.022.00.0122.00.01.02.00.01.00.00.030.00.00.0108.00.00.022.00.01.020.041.02.01.00.0147.00.00.00.00.00.052.01.00.00.02.0145.03.00.04.00.060.01.02.022.00.00.067.07.057.06.070.05.08.00.00.00.00.0130.04.06.080.015.00.09.00.00.00.00.057.021.090.022.03.00.00.01.048.00.06.02.0Cluster Unseen Data (you would prefer to build classifier instead)In[9]:labels_unseen=ks.predict(X_test,init=centroids)Evaluate AccuracyIn[10]:y_clustd=pd.Series(labels).replace(dict(enumerate(order)))...:y_unseen=pd.Series(labels_unseen).replace(dict(enumerate(order)))In[11]:balanced_accuracy_score(y_train,y_clustd)# train dataOut[11]:0.6940733254455871In[12]:balanced_accuracy_score(y_test,y_unseen)# unseen dataOut[12]:0.646615365026082ToDo:apply power-transform before initial scaling-considerpyckmeansconsiderpyxmeans
Package: ksd
Easily Read Kubernetes SecretsRead base64 encoded Kubernetes secrets without getting in your way.Kubernetes secrets resources base64 encode the secret values. It is often
useful to view the decoded values for those secrets in place. This tool
offers a useful means to do that.Featuresallows you to read one or more Secretsworks with individual secrets, lists of secrets, and multiple yaml docssimple auditable Python source codeInstallInstall with pippipinstallksdInstall with pipxpipxinstallksdQuick Example$kubectlgetsecret-nmynamespace-oyamlmysecret|ksdapiVersion:v1data:password:my-decoded-password-secretusername:my-decoded-username-secretkind:Secretmetadata:creationTimestamp:'2024-01-01T00:00:0Z'labels:name:mynamespacename:mysecretnamespace:mynamespaceresourceVersion:'1234'uid:c4f4c4db-bdba-47d0-9a17-1e307e1448c7type:OpaqueDetailed UsageGet helpksd--helpGet single secret as YAML and decode as YAMLkubectlgetsecret-oyamlmysecret|ksdGet single secret as YAML and decode as JSONkubectlgetsecret-oyamlmysecret|ksd-fjsonGet multiple secrets as YAML and decode as YAMLkubectlgetsecret-oyaml|ksdGet multiple secrets as YAML and decode as JSONkubectlgetsecret-oyaml|ksd-fjsonGet secrets as JSON and decode as YAMLkubectlgetsecret-ojson|ksdGet secrets as JSON and decode as JSONkubectlgetsecret-ojson|ksd-fjsonUse k8s flags as normalkubectlgetsecret-nmy_namespace-llabel_key=label_value-ojson|ksdI don't know why you would do this, but the output is idempotentkubectlgetsecret-oyaml|ksd|ksdRead Secrets from a filecatsecrets.yaml|ksdSuppoert multi-document yaml input (separated with the yaml '---')kubectlgetsecret-oyamlmysecret>secrets.yamlecho"---">>secrets.yaml
kubectlgetsecret-oyamlohter_secret>>secrets.yaml
catsecrets.yaml|ksdInspired byThere are several projects with a similar name and purpose. However, they
are written in Go and distribute compiled binaries. I prefer to use a version
of this tool written in Python, for which the source code is auditable.Testspipinstall-e.[tests]pytest-vvvtests/
Package: ksddescent
Sampling by optimization of the Kernel Stein DiscrepancyThe paper is available atarxiv.org/abs/2105.09994.The code uses Pytorch, and a numpy backend is available for svgd.InstallThe code is available on pip:$ pip install ksddescentDocumentationThe documentation is atpierreablin.github.io/ksddescent/.ExampleThe main function isksdd_lbfgs, which uses the fast L-BFGS algorithm to converge quickly.
It takes as input the initial position of the particles, and the score function.
For instance, to samples from a Gaussian (where the score is identity), you can use these simple lines of code:>>>importtorch>>>fromksddescentimportksdd_lbfgs>>>n,p=50,2>>>x0=torch.rand(n,p)# start from uniform distribution>>>score=lambdax:x# simple score function>>>x=ksdd_lbfgs(x0,score)# run the algorithmReferenceIf you use this code in your project, please cite:Anna Korba, Pierre-Cyril Aubin-Frankowski, Simon Majewski, Pierre Ablin
Kernel Stein Discrepancy Descent
International Conference on Machine Learning, 2021Bug reportsUse thegithub issue trackerto report bugs.
Package: kse801-dataset
Dataset for KSE801: Sensor Data ScienceInstallpip install kse801-datasetHow to useThe datasets are separated by their source names: ['abc', 'crowdsignal', 'kaist']For example:fromkse801.abcimportload_app_usagefromkse801.kaistimportload_activityfromkse801.crowdsignalimportload_accel_phoneabc_app_usage=load_app_usage()kaist_activity=load_activity()crowdsignal_accel=load_accel_phone()Datasets are formatted as pandas's DataFrame, except receptivity data (i.e., kse801.kaist.load_receptivity)
Package: ksef
ksefPython interface for the KSEF APIUsingTo add and install this package as a dependency of your project, runpoetry add ksef.ContributingPrerequisites1. Set up Git to use SSHGenerate an SSH keyandadd the SSH key to your GitHub account.Configure SSH to automatically load your SSH keys:cat<< EOF >> ~/.ssh/configHost *AddKeysToAgent yesIgnoreUnknown UseKeychainUseKeychain yesEOF2. Install DockerInstall Docker Desktop.EnableUse Docker Compose V2in Docker Desktop's preferences window.Linux only:Configure Docker to use the BuildKit build system. On macOS and Windows, BuildKit is enabled by default in Docker Desktop.Export your user's user id and group id so thatfiles created in the Dev Container are owned by your user:cat<< EOF >> ~/.bashrcexport UID=$(id --user)export GID=$(id --group)EOF3. Install VS Code or PyCharmInstall VS CodeandVS Code's Dev Containers extension. Alternatively, installPyCharm.Optional:install aNerd Fontsuch asFiraCode Nerd Fontandconfigure VS Codeorconfigure PyCharmto use it.Development environmentsThe following development environments are supported:⭐️GitHub Codespaces: click onCodeand selectCreate codespaceto start a Dev Container withGitHub Codespaces.⭐️Dev Container (with container volume): click onOpen in Dev Containersto clone this repository in a container volume and create a Dev Container with VS Code.Dev Container: clone this repository, open it with VS Code, and runCtrl/⌘+⇧+P→Dev Containers: Reopen in Container.PyCharm: clone this repository, open it with PyCharm, andconfigure Docker Compose as a remote interpreterwith thedevservice.Terminal: clone this repository, open it with your terminal, and rundocker compose up --detach devto start a Dev Container in the background, and then rundocker compose exec dev zshto open a shell prompt in the Dev Container.DevelopingThis project follows theConventional Commitsstandard to automateSemantic VersioningandKeep A ChangelogwithCommitizen.Runpoefrom within the development environment to print a list ofPoe the Poettasks available to run on this project.Runpoetry add {package}from within the development environment to install a run time dependency and add it topyproject.tomlandpoetry.lock. Add--group testor--group devto install a CI or development dependency, respectively.Runpoetry updatefrom within the development environment to upgrade all dependencies to the latest versions allowed bypyproject.toml.Runcz bumpto bump the package's version, update theCHANGELOG.md, and create a git tag.
Package: ksef-utils
KSeF utilsThis project contains Python utilities and example requests that can be helpful when integrating with Polish central invoicing system calledKrajowy System e-Faktur (KSeF).InstallationCreating python virtual environmentSeevirtualenvwrapperdocumentation.$mkvirtualenvksef
$workonksef(ksef)$Installing package from source(ksef)$gitclonehttps://github.com/pprzetacznik/ksef-utils.git(ksef)$cdksef-utils(ksef)$pipinstall-e.Installing package from PyPI(ksef)$pipinstallksef-utilsRun testsSet up secretsLog in tohttps://ksef-test.mf.gov.pl/web/and generate your individualKSEF_TOKEN.#!/bin/bashexportKSEF_TOKEN="..."exportKSEF_ENV="test"exportKSEF_NIP="..."exportKSEF_SIGN_CERT_PATH="cert.pem"exportKSEF_SIGN_KEY_PATH="privkey.pem"exportKSEF_SIGN_CA_PATH="cert.pem"Generate test certKSEF_NIP=${KSEF_NIP:-2222222222}KSEF_SUBJECT="/CN=John Doe/SN=Doe/GN=John/O=My Corp/C=PL/L=Lesser Voivodeship/serialNumber=NIP-${KSEF_NIP}/description=John Doe NIP-${KSEF_NIP}"opensslreq-x509\-nodes\-subj"${KSEF_SUBJECT}"\-days365\-newkeyrsa\-keyout$KSEF_SIGN_KEY_PATH\-out$KSEF_SIGN_CERT_PATHRun pytest framework(ksef)$pipinstall-rrequirements.txt(ksef)$pytest-svvvMarkersRun all e2e/functional/current tests(ksef) $ pytest -svvv tests/test_ksef.py -m "e2e and not ignore"
(ksef) $ pytest -svvv tests/test_ksef.py -m "functional and not ignore"
(ksef) $ pytest -svvv tests/test_ksef.py -m "current and not ignore"
(ksef) $ ./run_tests.sh
(ksef) $ TESTS_MARKERS="init_signed and functional and not ignore" ./run_tests.shExampleSeetests/test_e2e.pyfor detailed examples of usage.fromksef_utils.serverimportKSEFServer,KSEFServicefromksef_utils.configimportTestConfig,DemoConfig,ProdConfigconfig=TestConfig()server=KSEFServer(config)service=KSEFService(service)invoice_data={# ...# see tests/conftest.py for example json invoice}session_token=service.init_signed()response_send_invoice=service.send_invoice(**invoice_data)Using cli utilities(ksef) $ python -m ksef_utils --identifier 1111111111 --identifier_type NIP --working_directory .
(ksef) $ pip install .
(ksef) $ which ksef-utils
(...)/.envs/bin/ksef-utils
(ksef) $ ksef-utils --identifier 1111111111 --identifier_type PESEL --working_directory .OpenAPI/openapi/gtw/svc/api/KSeF-common.yaml
/openapi/gtw/svc/api/KSeF-batch.yaml
/openapi/gtw/svc/api/KSeF-online.yamlPublish new release$gittagv1.0
$gitpushoriginv1.0Building documentation(ksef)$sphinx-build-Mhtmldocsdocs_buildKSEF referenceshttps://www.podatki.gov.pl/ksef/https://ksef-test.mf.gov.pl/web/https://www.youtube.com/watch?v=dnBGO6IPtzAContributinghttps://www.conventionalcommits.org/en/v1.0.0/
Package: k-seq
kinetic sequencing: high through-put kinetic parameter estimation for genetic encoded biomoleculesIssue report:https://github.com/ynshen/k-seq/issuesInstallation / updateThis is the temporary installation fork-seqpackage before publication, we will upload to pypi so it could be installed throughpip install k-seqStep 1: Clone the this git repo to your local>cd/dir/to/save/repo
>gitclonehttps://github.com/ichen-lab-ucsb/k-seq.gitStep 2: run installation code>cd/dir/to/save/repo/k-seq/
>sh./install.shThere might be a prop to uninstall the oldk-seqpackage, if installed.To varify the installation of package>python-c"import k-seq"# No error showsGetting started examplesGetting startedGetting started notebook to run interactively:/examples/getting_started.ipynbSeedocumentation websitefor usageTODOClean up archived old code and notebooks
Package: kser
Kafka serialize python libraryKser is a bundle of python library whose purpose is to serialize tasks to be
executed on Kafka consumers. It supports farious extensions:TransportlibrdkafkaYou can choose to use the C bindings usingconfluent-kafka:$ pip install kser[confluent]NoteYou need to install manually librdkafka, seeconfluent-kafka-python documentationkafka-pythonYou can choose the pure python librarykafka-python:$ pip install kser[pykafka]httpThere is also a light version using HTTP ideal to produce messages (not recommended for consumption)$ pip install kser[http]Otherencrypt dataIt is possible to encrypt messages in the Kafka queue usinglibsodium.$ pip install kser[crypto]NoteYou need to install manually libsodium, seelibsodium documentationprometheus exporterYou can export metrics using theprometheusformat:$ pip install kser[prometheus]A few set of environment variables allow to manage the exporter:Environment variableDefault valueKSER_METRICS_ENABLEDnoKSER_METRICS_ADDRESS0.0.0.0KSER_METRICS_PORT8888The exporter has only 2 metrics defined by default, it’s just a sample. A good
way to implement your own is to override the triggers methods (prefixed with ‘_’) like the following example:fromkserimportKSER_METRICS_ENABLEDfromprometheus_clientimportCounterfromkser.entryimportEntrypointMY_METRIC=Counter('kser_my_metric','a usefull metric')classMyEntrypoint(Entrypoint):def_run(self):ifKSER_METRICS_ENABLED=="yes":MY_METRIC.inc()returnself.run()See also:prometheus_client documentationDocumentation of the python Prometheus clientopentracing supportYou can useopentracingwithJaegerto follow operation and task:$ pip install kser[opentracing]Configuration can be set using environment variable:Environment variableDefault valueJAEGER_HOSTlocalhostSee also:Opentracing support with JaegerKser documentationAdd-onsFlask extension: Flask integration.RequirementsPython 3.xDocumentationsProject:http://kser.readthedocs.io/Libsodium:https://download.libsodium.org/doc/confluent-kafka-python:http://docs.confluent.io/current/clients/confluent-kafka-pythonkafka-python:http://kafka-python.readthedocs.io/en/master/Other linksPyPI:https://pypi.python.org/pypi/kserProject issues:https://github.com/cdumay/kser/issuesLicenseLicensed under MIT license (LICENSEorhttp://opensource.org/licenses/MIT)