Saravanan666/pypi-org huggingface dataset:
Package: mkmsdk
# Magic Kard Market Python SDK[![image](https://badge.fury.io/py/mkmsdk.png)](http://badge.fury.io/py/mkmsdk)[![image](https://readthedocs.org/projects/mkm-sdk/badge/?version=latest)](http://mkm-sdk.readthedocs.org/en/latest/)[![image](https://coveralls.io/repos/evonove/mkm-sdk/badge.svg)](https://coveralls.io/r/evonove/mkm-sdk)[![image](https://travis-ci.org/evonove/mkm-sdk.svg)](https://travis-ci.org/evonove/mkm-sdk)A simple SDK for dedicated and widget apps working with Magic Kard
Market.# ContributingFeel free to contribute! Submit [a PR following the
guidelines](https://mkm-sdk.readthedocs.io/en/latest/contributing.html#pull-request-guidelines/)
and it will be alright.# RequirementsPython 3.8, 3.9, 3.10, 3.11[Requests](http://docs.python-requests.org/)[Requests_OAuthlib](https://github.com/requests/requests-oauthlib/)# SetupFrom the command line:pip install mkmsdkFor the SDK to work properly you need to create four environment
variables holding the tokens necessary to create the authorization to
make requests. You can find them in your Magic Kard Market account page
under the apps section.MKM_APP_TOKENMKM_APP_SECRETMKM_ACCESS_TOKENMKM_ACCESS_TOKEN_SECRET[MKM_ACCESS_TOKEN]{.title-ref} and [MKM_ACCESS_TOKEN_SECRET]{.title-ref}
need to be set to empty string if you want to use a widget app.# UsageFirst thing to do is import the [Mkm]{.title-ref} class and the API map:from mkmsdk.mkm import Mkm
from mkmsdk.api_map import _API_MAPInstance a new instance of Mkm:# Using API v1.1
mkm = Mkm(_API_MAP[“1.1”][“api”], _API_MAP[“1.1”][“api_root”])
# Using API v2.0
mkm = Mkm(_API_MAP[“2.0”][“api”], _API_MAP[“2.0”][“api_root”])If you want to test on Magic Card Market's sandbox you must use the
sandbox root endpoint:mkm_sandbox = Mkm(_API_MAP[“2.0”][“api”], _API_MAP[“2.0”][“api_sandbox_root”])To make a request:response = mkm.account_management.account()# Formats an endpoint
response = mkm.market_place.user(user=’SampleUser’)# Call endpoint with specified parameters
response = mkm.account_management.vacation(params={“onVacation”: “false”})This will return a
[Response](http://docs.python-requests.org/en/latest/api/?highlight=response#requests.Response/)
object that contains the response from the server.Note that only [market_place]{.title-ref} requests work when using a
widget app.To get a json you can call response.json().# TestsIntegration tests will be skipped if the four environment variables are
not set.MKM_APP_TOKENMKM_APP_SECRETMKM_ACCESS_TOKENMKM_ACCESS_TOKEN_SECRETNote that some tests will be skipped depending if
[MKM_ACCESS_TOKEN]{.title-ref} and [MKM_ACCESS_TOKEN_SECRET]{.title-ref}
are empty strings or not.
Package: mkname
A Python package for building names by using other names as building
blocks.Why?It started with an update to a blackjack game I wrote as my first
project in Python. I wanted to have a bunch of computer players
playing with you, and thought they should be randomly generated
with randomly generated names. Then it came up in a few other things
I wrote, so I figured I’d turn it into a package.What does it do?It pulls random names from a database, and can modify those names
before returning them. Major features include:Use parts of multiple names to construct a new name.Modify the selected or constructed names.Use a default database of names.Use your own database of names.Import into your Python code as a package.Use from the command line.How do I run it?The easiest way to install and runmknameis:Ensure you are using Python 3.10 or higher.Install from PyPI using pip:pip install mknameRun the following command to see the options:mkname -hIt should also be able to be imported into your Python code as a package.What Changed in Version 0.2.3The following changes were made in v0.2.3:(To-Do) Fixed automatic creation of database connections.How do I run the tests?I’m using thepytestlibrary for the unit tests. To just run those tests,
go to the root of your clone of themknamerepository and use the following
command:python3 -m pytestThe full suite of style checks, mypy, and such I use can be run using a
shortcut I have set up in the Makefile:make preNote:precommit.pyrequires itself to be run from a virtual environment
located in the.venvdirectory at the root of the repository. This is so
I don’t accidentally run it using my system’s Python and then waste hours
troubleshooting that mess. If you want to disable this, you’ll have to
modify the script. The easiest way is probably commenting out thecheck_venv()call inmain().
Package: mknodes
MkNodesDon't write docs. Code them.Read the completely coded documentation!Programatically create web pagesdefcreate_github_index_md()->mk.MkPage:page=mk.MkPage("Github index")page+=mk.MkCode.for_object(create_github_index_md)page+=mk.MkHeader("MkNodes",level=1)page+=mk.MkHeader("Don't write docs. Code them.",level=4)page+=mk.MkShields()page+=mk.MkLink(DOC_URL,"Read the completely coded documentation!")page+=mk.MkInstallGuide(header="How to install")page+=mk.MkHeader("All the nodes!")page+=mk.MkClassDiagram(mk.MkNode,mode="subclasses",direction="LR")returnpageCreate a website tree@nav.route.page("Changelog",icon="format-list-group")def_(page:mk.MkPage):page+=mk.MkChangelog()Powerful templating{{"Inlined text"|MkAdmonition(inline="left")}}How to installpipThe latest released version is available at thePython package index.pipinstallmknodes
Package: mknotebooks
mknotebooksmknotebooks is a plugin forMkDocsenabling you to includeJupyternotebooks directly in your project documentation.Installpip3 install mknotebooksUsageAddmknotebooksto the plugin section of yourmkdocs.ymlInclude any notebooks (.ipynbfiles) you want to use in thedocs/directory just as you would.mdfiles.Example:# mkdocs.ymlnav:-your_notebook.ipynbplugins:-mknotebooksAny static images, plots, etc. will be extracted from the notebook and placed alongside the output HTML.OptionsYou can optionally execute the notebooks, by settingexecute: truein the config. You can include a hidden preamble script, to be run before executing any cells usingpreamble: "<path/to/your/script>". The default cell execution timeout can be overridden by settingtimeout: <timeout>, where<timeout>is an integer number of seconds.By default, execution will be aborted if any of the cells throws an error, but you can setallow_errors: trueto continue execution and include the error message in the cell output.Example:# mkdocs.ymlplugins:-mknotebooksexecute:falsetimeout:100preamble:"<path/to/your/script>"allow_errors:falseStylingMknotebooks applies default styling to improve the appearance of notebook input/output cells and pandas dataframes. If these interfere with any other CSS stylesheets that you're using, you can disable these via the following options.# mkdocs.yml
- mknotebooks:
   enable_default_jupyter_cell_styling: false
   enable_default_pandas_dataframe_styling: falseSyntax highlightingIn order to enable syntax highlighting for code blocks,pygmentshas to be installed andcodehiliteextension has to be enabled inmkdocs.yml.Install pygments:pip install PygmentsEnablecodehiliteextension inmkdocs.yml:# mkdocs.yml
markdown_extensions:
    - codehiliteBinderYou can also choose to have mknotebooks insert aBinderlink into each notebook.- mknotebooks:
      binder: true
      binder_service_name: "gh"
      binder_branch: "master"
      binder_ui: "lab"If you are using GitLab, you will need to setbinder_service_nameto"gl".ExamplesSee theexamples folderfor examples on theuse of a preambleandusing Binder. Try them out by runningpipenv install && pipenv run mkdocs serve.Inspecting generated markdownYou can also export the generated markdown by settingwrite_markdown: truein yourmkdocs.yml. This will write the generated markdown to a.md.tmpfile alongside the original notebook.
Package: mknotebooks-with-links
mknotebooksmknotebooks is a plugin forMkDocsenabling you to includeJupyternotebooks directly in your project documentation.Installpip3 install mknotebooksUsageAddmknotebooksto the plugin section of yourmkdocs.ymlInclude any notebooks (.ipynbfiles) you want to use in thedocs/directory just as you would.mdfiles.Example:# mkdocs.ymlnav:-your_notebook.ipynbplugins:-mknotebooksAny static images, plots, etc. will be extracted from the notebook and placed alongside the output HTML.OptionsYou can optionally execute the notebooks, by settingexecute: truein the config. You can include a hidden preamble script, to be run before executing any cells usingpreamble: "<path/to/your/script>". The default cell execution timeout can be overridden by settingtimeout: <timeout>, where<timeout>is an integer number of seconds.By default, execution will be aborted if any of the cells throws an error, but you can setallow_errors: trueto continue execution and include the error message in the cell output.Example:# mkdocs.ymlplugins:-mknotebooksexecute:falsetimeout:100preamble:"<path/to/your/script>"allow_errors:falseStylingMknotebooks applies default styling to improve the appearance of notebook input/output cells and pandas dataframes. If these interfere with any other CSS stylesheets that you're using, you can disable these via the following options.# mkdocs.yml
- mknotebooks:
   enable_default_jupyter_cell_styling: false
   enable_default_pandas_dataframe_styling: falseSyntax highlightingIn order to enable syntax highlighting for code blocks,pygmentshas to be installed andcodehiliteextension has to be enabled inmkdocs.yml.Install pygments:pip install PygmentsEnablecodehiliteextension inmkdocs.yml:# mkdocs.yml
markdown_extensions:
    - codehiliteBinderYou can also choose to have mknotebooks insert aBinderlink into each notebook.- mknotebooks:
      binder: true
      binder_service_name: "gh"
      binder_branch: "master"
      binder_ui: "lab"If you are using GitLab, you will need to setbinder_service_nameto"gl".ExamplesSee theexamples folderfor examples on theuse of a preambleandusing Binder. Try them out by runningpipenv install && pipenv run mkdocs serve.Inspecting generated markdownYou can also export the generated markdown by settingwrite_markdown: truein yourmkdocs.yml. This will write the generated markdown to a.md.tmpfile alongside the original notebook.
Package: mkp
python-mkpPack or unpackCheck_MKmkp files.The purpose of this library is to generate mkp files from source without having to set up a complete Check_MK instance. It is not intended for installing mkp files to a Check_MK site.Installationpip install mkpUsageAutomatically pack mkp packageCreate a executable script in the the top directory, e.g.dist.py#!/usr/bin/env python

from mkp import dist

dist({
    'author': 'John Doe',
    'description': 'Test the automatic creation of packages',
    'download_url': 'http://example.com/',
    'name': 'test',
    'title': 'Test',
    'version': '1.0',
    'version.min_required': '1.2.3',
})Create a directory structure as follows:├── agents/
├── checkman/
├── checks/
├── doc/
├── inventory/
├── notifications/
├── pnp-templates/
├── web/
└── dist.pyEmpty directories can be omitted. Runningdist.pywill pack all files in the
directories listed above to a mkp package with the canonical name and the
specified metadata. The mkp file will be written to thedistdirectory.Extract mkp packageimport mkp

package = mkp.load_file('foo-1.0.mkp')
print(package.info)
package.extract_files('path/to/somewhere')Pack files to mkp packageIn contrast todist, this provides the possibility to manually select the
files by replacingfind_files. It is also possible to choose a different
output filename.import mkp

info = {
  'author': 'tom-mi',
  'description': 'Test the system',
  'download_url': 'http://example.com/',
  'files': mkp.find_files('path/to/files'),
  'name': 'test',
  'title': 'Test',
  'version': '1.0',
  'version.min_required': '1.2.3',
}
mkp.pack_to_file(info, 'path/to/files', 'test-1.0.mkp')LicenseThis software is licensed under GPLv2.
Package: mkpatcher
mkpatchermkpatcheris a Python-Markdown extension allowing arbitrary scripts to modify MkDocs input files.Table of ContentsInstallationUsageRaw scriptScripts on filesystemLicenseInstallationpip install mkpatcherInclude the extension in yourmkdocs.ymlconfig file:...markdown_extensions:...- mkpatcher:...UsageThis extension works as a pre-processor and will allow modifying the raw lines of Markdown before any other extension runs.Raw scriptThescriptoption takes arbitrary Python code and will provide the Markdown lines as a variable namedlines.You can modify the lines directly:...markdown_extensions:...- mkpatcher:script:|lines.extend(('', 'some footer', ''))or you can shadow the variable:...markdown_extensions:...- mkpatcher:script:|lines = ['entirely', 'new']lines.append('markdown')Scripts on filesystemThelocationoption takes a path to either a single Python file or a directory containing multiple Python files.
If the location refers to a directory, the scripts will be loaded and eventually executed in lexicographical order
based on file names....markdown_extensions:...- mkpatcher:location:docs/.scriptsEach script must define a callable object namedpatchthat accepts a single parameter which will be the Markdown lines.You can modify the lines directly:defpatch(lines):lines.extend(('','some footer',''))or you can return new lines:defpatch(lines):new_lines=['entirely','new']new_lines.append('markdown')returnnew_linesLicensemkpatcheris distributed under the terms of bothApache License, Version 2.0MIT Licenseat your option.
Package: mkpi
# mkpi [![Version][version-badge]][version-link]![MIT License][license-badge]make python project setuptools template是一个用来自动生成python project setup模板的工具### 示例### 使用方式```Usage: mkpi [-h] [--name PROJECT_NAME]optional arguments:-h --help   show this help message--name      name of the project you want to create```### 安装```$ pip install mkpi```### License[MIT](https://github.com/wanix1988/python-setup-boilerplate/blob/master/LICENSE)[version-badge]: https://img.shields.io/badge/version-0.1-brightgreen.svg[version-link]:    https://pypi.org/project/mkpi[license-badge]:   https://img.shields.io/github/license/mashape/apistatus.svg
Package: mkpp
mkppSimple tool for creating Python packages. For lazies.Installationmkppcan be easily installed viapip:pip install mkppUsagemkpp [--help] [--verbose] [--version] [--parents] [--no-pep8] [--include [FILES]] [--executable] packages [PACKAGES]Examplesmkpp --executable mypackage1 ~/code/projects/mypackage2 some-dir/mypackage3 --include configmkpp app --executablemkpp --executable prog --include utils cli
Package: mkpreview
mkpreview builds a grid of images from a movie file.
- Support for all video file types in FFMPEG.
- It will create a SQLite3 database with all of the video meta dataparameters and create an MD5 hash of the file
- It provides very basic support for creating video part numbersGet Started!Here’s how to set upmkpreviewfor local environment.1- Clone themkpreviewlocally:$gitclonegit@github.com:/mkpreview.git2- Install your local copy into avirtualenv. Assuming you havevirtualenvwrapperinstalled, this is how you set up the package for local development:$sudomakeboostrap$mkvirtualenvmkpreview$pipinstall-rrequirements/dev.txt3- How to enable/disable virtualenv$workonmkpreview$...$deactivateCreditsThis package was generated usingYeomanandCookiecutterprojects.# ChangelogAll notable changes to this project will be documented in this file.The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).## [Unrelease]### Addedadded configuration informationfixed production requirements[Unrelease] TBD-link
Package: mkprj
mkprjA basic CLI tool to create bare-bones Python projects, the way I like them.It will:Create a project directoryInitializegitAdd a.gitignoreCreate a virtualenvCreate arequirements.txtwith the default requirements, or a comma-separate list specified with--requirementsInstallationpipinstallmkprjUsageusage:mkprj[-h][--pythonPYTHON][--overwrite][--requirementsREQUIREMENTS]project_path

positionalarguments:project_pathPathtotheprojecttocreate.

optionalarguments:-h,--helpshowthishelpmessageandexit--pythonPYTHONPathtoPythoninterpretertouse.Defaultsto'python3'.--overwriteOverwriteexistingprojectatspecifieddirectory.--requirementsREQUIREMENTSComma-separatedlistofrequirementstoinstall.Planned enhancementsA--dockerflag to create aDockerfile, plusbuild.shandpush.shexecutable bash scriptsBetter support for creating virtualenvs in a default location (instead of the project directory)creating a main.py and test directoryMore to come.
Package: mkpw
The goal here was a simple password generator that will smash words together to
create a memorable password with a special character in between each word.  One
of the words will be uppercased.  The only options really available is the
number of words to be used.The tool was written using the memorable library to enable offline wordlists.❯ mkpw --help

 Usage: mkpw [OPTIONS] [NUM_WORDS]

 Memorable Password Generator
 Generates a password that should be able to be easily remembered

╭─ Arguments ────────────────────────────────╮
│   num_words      [NUM_WORDS]  [default: 5]                            │
╰───────────────────────────────────────╯
╭─ Options ─────────────────────────────────╮
│ --clip   -c               Send the password to the clipboard          │
│ --timer  -t      INTEGER  How many seconds to keep the password in in │
│                           the clipboard? [default: None]              │
│ --help                    Show this message and exit.                 │
╰───────────────────────────────────────╯


❯ mkpw
Generated Pasword: golden-perch+intentionally-IRRELEVANTLY0lumpy7pants
❯ mkpw 3
Generated Pasword: coaxingly_STUPENDOUS?worker
Package: mkpy224o
mkpy224oPython wrapper for mkp224o CLI tool.InstallationTo install the library:pip install mkpy224oThis wrapper requires mkp224o in order to function. If you want to use regular expressions as filters, you will need to enable the regex feature (disabled by default).gitclonegit@github.com:cathugger/mkp224o.gitcdmkp224o/./autogen.sh./configure--enable-regex=yesmakesudoinstallmkp224o/usr/local/bin/mkp224oNote that you can omit--enable-regex=yesif you don’t want to use regular expressions and you can install to any destination that is in yourPATH.Usagefrommkpy224oimportfind_keyskeys=find_keys('^foo',on_progress=print)The above will find a key that starts with foo. Progress will be printed to the console.
Package: mkpyp
mkpypmake python projects idiomaticallyGenerates a new idiomatic Python project for linux/macos:
project structure - .gitignore, LICENSE
format - black, isort
lint - ruff, mypy, black
test - pytest, coverage
other - pre-commit, Makefile, version.py, requirementsInstallationInstall withpip3 install mkpyp. Run withmkpyp.Developer InstallationAfter cloning this repo or initializing a new git repository withgit init, complete the following steps in root directory.# create a new virtual environment (e. g. venv)python3-mvenv.venv# activate the virtual environmentsource.venv/bin/activate# install pip-compile for auto-generating requirement filespipinstallpip-toolshatch# generate requirement filesmakerefresh-requirements# install the requirements and install 'mkpyp' as editable packagemakeinstall# autorun pre commit, needs .git directoy | manually run with pre-commitpre-commitinstallDependency ManagementThe location of where dependencies are declared depends on their scope.Package dependencies must be put intopyproject.toml [project] .dependencies.Opt-in dependencies must be put intopyproject.toml [project] .optional-dependencies.Testing dependencies must be put intorequirements/testing.in.Linting dependencies must be put intorequirements/linting.in.We generate the requirements files withmake refresh-requirements. Reinstall withmake install.PublishBuild the project withhatch build. Now runhatch publish --repo testto upload the package totest.pypi.org. Usehatch publish --repo mainto upload to the production PyPI. Define custom targets as per definedhere.
Package: mk-pyproject
一.项目模板生成工具所有Python开发项目统一放到指定目录 比如(我的都放在这个目录 /Users/chengxinyao/DataWarehouse/PythonProjects 使用该工具时候 json_file里targer_parent_dir参数保持一致)每个项目最好用统一的模板生成，防止各个项目都是不同的风格，维护起来心累通过该工具可快速启动新项目 通过配置文件生成项目开发文档README.md等二.目录结构实例,可通过配置文件定义,比如创建的logstreaming项目├── README.md 项目文档
├── bin       shell脚本
├── conf      项目配置文件
├── docs      项目里一些doc文件
├── examples  样例
├── log       日志目录
├── logstreaming
│   ├── __init__.py
│   ├── 模块A
│   │   └── __init__.py
│   ├── 模块B
│   │   └── __init__.py
│   └── 模块C
│       └── __init__.py
├── main.py   入口main函数
├── requiirements.txt 依赖包
└── test      测试脚本三.git clone 使用git clone git@github.com:chengcxy/mk_pyproject.git
cp mk_pyproject/templates/* 你的模板路径(使用该工具时候 json_file里template_path参数保持一致)
执行下面命令 可创建一个Bpoint项目的json_file
python3 gen_json_file.py Bpoint
下面是输出信息:
/Users/chengxinyao/DataWarehouse/PythonProjects/Bpoint 项目创建成功~
查看配置文件 cat /Users/chengxinyao/DataWarehouse/PythonProjects/global_config/Bpoint.json四.配置文件参数|参数|参数注释
|---|---
|project_name|项目名称
|template_path|模板全路径
|targer_parent_dir|所有python项目的父目录
|public_folders|项目的公共目录列表 配置文件里自自定即可 会自动再项目目录里创建
|public_files|模板全路径下的公共文件 README.md/requirements.txt/启动脚本main.py等 会自动再项目目录里创建
|project_modules|项目的模块列表 可自定义
|project_desc|项目描述 填写后会自动渲染到README.md
|python_version|python版本信息 填写后会自动渲染到README.md
|其他参数|python版本信息 填写后会自动渲染到README.md >三.其他信息下六.将该工具安装为命令行工具 以后可通过复制配置文件 创建项目(1)源码安装:
git clone git@github.com:chengcxy/mk_pyproject.git
cd 目录/mk_pyproject/bin
sh build.sh
此时 已将mk_pyproject模块添加到python 系统模块包路径下
(2)pip install mk-pyproject==0.0.1
将第三步生成的Bpoint.json 通过命令行工具生成
mk_pyproject --json_file ~/DataWarehouse/PythonProjects/global_config/Bpoint.json七.注意事项如果已经创建过项目 进入开发流程 请勿重复执行创建项目命令 会覆盖
Package: mkquartodocs
title: mkquartodocs
toc-title: Table of contentsMake gorgeous reproducible documentation with quarto and mkdocsIt is a plugin formkdocsthat rendersquartomarkdown documents into github, so they are
built with the rest of the documentation.Why?In many instances the documentation contains runnable code, and it makes
sense that you verify that the code runs and keep the output of the code
in sync with the current status of the document and software packages
involved.But mainlyI really got tired of manually rendering documents and
copying outpus.UsageInstall the dependencies:InstallationAdd the plugin to your configuration:ConfigurationAdd.qmdfiles to your./docs/directoyRunmkdocs buildThis will render code chunks and save the outputs! Check outhttps://quarto.org/for more examples on how to use the format.This ....```{python}
print(1+1)
```Will become this ...::: {.cell execution_count="1"}print(1+1)::: {.cell-output .cell-output-stdout}
2
:::
:::InstallationMake sure you have quarto installed in your computer.https://quarto.org/docs/get-started/InstallmkquartodocspipinstallmkquartodocsConfigurationAddmkquartodocsto your plugins in yourmkdocs.yml# Whatever is in your mkdocs.yml configuration file....# ...plugins:-mkquartodocsAvailable configuration options:quarto_path: Specifies where to look for the quarto executable.keep_output: If true it will skip the cleanup step in the
directory.ignore: a python regular expressions that if matched will mark
the file to not be rendered. Note that they need to be full matches# Whatever is in your mkdocs.yml configuration file....# ...plugins:-mkquartodocs:quarto_path:/home/my_folder/some/weird/place/to/have/executables/quartokeep_output:trueignore:(.*broken.*.qmd)|(.*page[0-9].qmd)RunningNOTHING !!! you do not have to run it manually!!When you callmkdocs build, it should automatically find your.qmdfiles, render them, generate the output and clean after itself.TODOThe things that need to/could be added to the project:quarto project supportrender in temporary directory, posibly with a 'safe' argumentaddition of files not in the docs directory, 'include' argumentadd readme to testing datamoveINFO     -  mkquartodocs: Running RemoveCellDataPreprocessorto
debug log
Package: mkreadme
mkreadme📝 Descriptionmkreadmeis a cli tool for interactive creation of aREADME.mdfile. It was inspired byreadme.so. You can choose from differentREADMEsections, which are then merged into a complete document.⚙️ InstallationInstallmkreadmewithpippipinstallmkreadme💡 Usage ExamplesTo interactively create a README file withmkreadme, runmkreadme --filename README.md🖼️ Screenshots