Skip to content

Commit

Permalink
Merge pull request #2 from Robot-Wranglers/mainline
Browse files Browse the repository at this point in the history
Mainline
  • Loading branch information
mattvonrocketstein authored Mar 12, 2024
2 parents b88f119 + 619104d commit ad7de2b
Show file tree
Hide file tree
Showing 20 changed files with 709 additions and 236 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ dmypy.json

# Pyre type checker
.pyre/
src/pynchon/_version.py
src/*/_version.py
.DS_Store

# Ignore dynaconf secret files
Expand Down
192 changes: 192 additions & 0 deletions .pynchon.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
{ // BEGIN: top-level pynchon config
// Everything here is optional.
// Literals only; no templating please!
"plugins": [
// defaults; these are included anyway
'globals', 'render', 'gen', 'project', 'plugins',
'jinja', 'git', 'core', 'python',
'tests',

// Recommended for projects with source-code
"docs", "src", "github",

// Standard if there's a python-project
"pypi", "python-api", "python-cli", "python-libcst",

// For projects with intermediate representations
"dot", // graphviz dot-files
"jinja", // projects with templated docs
"mermaid", // mermaid cli

// Experimental
// "griffe", // ast tool
],
// END: top-level config
// BEGIN: core plugins-config
"python-libcst":{
// .libcst.codemod.yaml file:
// leave this empty to use a static one
// that's already present. fill it in
// to have it recreated when needed and
// use pynchon's context for templating it
".libcst.codemod.yaml": {
"repo_root": "{{src.root}}",
"generated_code_marker": '@generated',
"formatter": ['black', '-'],
"blacklist_patterns": [],
"modules": [
'libcst.codemod.commands',
'pynchon.codemod.commands',
],
},
// "apply_hooks": ["display-modified"],


},
// Config for `globals` plugin: (priority=..)
// All well-behaved plugins will honor values here, appending
// these values to whatever is set explicitly for that plugin
"globals": {
"exclude_patterns": [
".*[.]pyc",
".*_version[.]py",
"**/tests/fixtures/**",
"**/build/lib/**",
"**/*.egg-info/**",
],
},

// Config for `src` plugin:
// This provides find/search tooling, plus file-header generators, etc
"src": {
"root": "{{pynchon.root}}/src",
"exclude_patterns": [
"**/pynchon/templates/scaffolds/**",
],

"include_patterns": [
"{{src.root}}/**/*.py",
"{{src.root}}/**/*.j2",
],
"headers": {},
"goals": [
// ...
],
},

// Config for `tests` plugin:
// ...
"tests": {
"root": "{{pynchon.root}}/tests",
"include_patterns": ["**/*.py",],
"suite_patterns": ["*/",],
},

// Config for `docs` plugin:
// Runs a webserver to open docs-files
"docs": {
"root": "{{pynchon.root}}/docs",
"include_patterns": [
"{{pynchon.root}}/*.md",
"{{docs.root}}/**/*.md",
"{{docs.root}}/**/*.html",
],
"apply_hooks": [],
},
// Config for `project` plugin:
"project":{
"subproject_patterns": [],
},

// END: core plugins-config
// BEGIN: other plugins-config

// Config for `github` plugin:
"github": {},

// Config for `hooks` plugin:
"hooks": {},


// Config for `jinja` plugin:
// Planner for finding/rendering project .j2 files
"jinja":{
"context_vars": {
// extra context-vars passed for renders
// allows {tpls|json}
},

"filter_includes": [
// where to load jinja filters from
// allows {tpls|paths|globs}
],

"exclude_patterns": [
// Describes files that shouldn't show up in plans
// `globals.exclude_patterns` will be appended.
"**/pynchon/templates/**",
],

"template_includes": [
// Paths to load includes from.
// (Used in templates as `{% include .. %}`)
"{{docs.root}}/includes",
],
},

// Config for `fixme` plugin:
// `globals.exclude_patterns` will be appended.
"fixme": {
"exclude_patterns": [
"{{src.root}}/**/fixme/**",
"{{src.root}}/**/fixme.py",
"{{src.root}}/**/python/api/**",
"{{src.root}}/pynchon/annotate.py",
],
},
// Config for `python-api` plugin:
// This generates API docs for python-packages
"python":{},
// Config for `python-api` plugin:
// This generates API docs for python-packages
"python-api":{
"skip_private_methods": true,
"skip_patterns": [],
},

// Config for `scaffolding` plugin:
// This provides ways to synchronize/diff project boilerplate.
// (Similar to cookie-cutter[], but more simple to use.)
"scaffolding":{
"exclude_patterns": [
// includes globals
],
"scaffolds":[
// list of Scaffolds-objects
{
"name": "subproject tox.ini's",
"pattern": "**/tox.ini",
"scope":"*",
"src":"pyproject.toml",
},
],
},

// Config for `pypi` plugin:
// Provider for details about the PyPI this project uses.
// (This is only used in rendering docs; `pynchon` does not manage releases.
// You can probably leave this blank for public PyPI but pynchon's own
// config has some values just1to ensure the plugin is exercised.)
"pypi": {
"name":"THE public PyPI"
},

// Config for `cicd` plugin:
// Provider for details about the build server for this project.
// (This is only used in rendering docs; `pynchon` does not manage builds.)
"cicd": {
// "url_base": "",
// "url_build": "",
"url_deploy": "OVERRIDE",
},
}
29 changes: 14 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
<!--- This is a markdown file. Comments look like this --->

<table width=100%>
<tr>
<td colspan=2><strong>
aws-ssm-tool
</strong>&nbsp;&nbsp;&nbsp;&nbsp;
<small><small>
</small></small>
</td>
</tr>
<tr>
<td width=15%><img src=img/icon.png style="width:150px"></td>
<td>
Helper for interacting with SSM
SSM tool is a small helper for interacting with Amazon Simple Systems Manager, focusing on secrets storage/retrieval.
<br/><br/>
<a href=https://pypi.python.org/pypi/ssm-tool/><img src="https://img.shields.io/pypi/l/ssm-tool.svg"></a>
<a href=https://pypi.python.org/pypi/ssm-tool/><img src="https://badge.fury.io/py/ssm-tool.svg"></a>
Expand All @@ -30,11 +26,11 @@

## Overview

The [AWS SSM Parameter-Store](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-parameter-store.html) is great, but can be awkward to work with via the `awscli` tool. This project provides the `ssm` tool as an alternative interface with simple CRUD.
The [AWS SSM Parameter-Store](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-parameter-store.html) is great, but can be awkward to work with via the `awscli` tool. This project provides the `ssm` tool as an alternative interface with simple CRUD. It also supports moving or copying trees of multiple parameters, and performing those operations across multiple AWS profiles.

See [setup.cfg](setup.cfg) to find the latest info about required versions of boto.
See [setup.cfg](setup.cfg) to find the latest info about required versions of boto. There are other dependencies, including the popular [click](#) library for CLI support and [rich](#) for pretty output.

See the [Usage section](#usage) for more details
See the [Usage section](#usage) for more details.

---------------------------------------------------------------------------------

Expand All @@ -54,29 +50,29 @@ After installation, you can invoke this tool as either `ssm` or `python -m ssm`.

Usage info follows:

```
```bash

$ ssm --help

Usage: ssm [OPTIONS] COMMAND [ARGS]...

Tool for accessing secrets
SSM tool, a small helper for interacting with Amazon Simple Systems Manager
for secrets storage/retrieval.

Options:
--help Show this message and exit.

Commands:
copy copy a secret
delete delete secret (keeping a local-backup is default)
get-many get many secrets from hierarchy/namespace
list list prefixes below the given path
get-many get many secrets from specified hierarchy/namespace
list list parameters with prefixes below the given path
move move a secret
move-many move a whole path of secrets
put-many put many secrets
read get a secret
stat reports status, including account details and metadata...
update put a secret
cp ALIAS for `copy`
get ALIAS for `read`
get-path ALIAS for `get-many`
ls ALIAS for `list`
move-path ALIAS for `move-many`
mv ALIAS for `move`
Expand All @@ -86,6 +82,9 @@ Commands:
put-path ALIAS for `put-many`
rm ALIAS for `delete`
set ALIAS for `update`
st ALIAS for `stat`
```

See [the integration tests](tests/integration/test.sh) for more examples.

---------------------------------------------------------------------------------
9 changes: 5 additions & 4 deletions README.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@
</tr>
</table>

---------------------------------------------------------------------------------

{{markdown_toc(__template__, level=2)}}

---------------------------------------------------------------------------------

## Overview

The [AWS SSM Parameter-Store](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-parameter-store.html) is great, but can be awkward to work with via the `awscli` tool. This project provides the `ssm` tool as an alternative interface with simple CRUD.
The [AWS SSM Parameter-Store](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-parameter-store.html) is great, but can be awkward to work with via the `awscli` tool. This project provides the `ssm` tool as an alternative interface with simple CRUD. It also supports moving or copying trees of multiple parameters, and performing those operations across multiple AWS profiles.

See [setup.cfg](setup.cfg) to find the latest info about required versions of boto. There are other dependencies, including the popular [click](#) library for CLI support and [rich](#) for pretty output.

Expand Down Expand Up @@ -70,9 +72,6 @@ Commands:
read get a secret
stat reports status, including account details and metadata...
update put a secret
cp ALIAS for `copy`
get ALIAS for `read`
get-path ALIAS for `get-many`
ls ALIAS for `list`
move-path ALIAS for `move-many`
mv ALIAS for `move`
Expand All @@ -85,4 +84,6 @@ Commands:
st ALIAS for `stat`
```

See [the integration tests](tests/integration/test.sh) for more examples.

---------------------------------------------------------------------------------
Loading

0 comments on commit ad7de2b

Please sign in to comment.