lambda-git
A git binary installed through PyPI for AWS Lambda - inspired by the JavaScript package lambda-git.
Installation
$ pip install lambda-git
Usage
To use this, just require it and call exec_command. E.g:
import git
git.exec_command('init') # will run 'git init'
Executing commands in a specific path:
AWS Lambda give you only /tmp as working directory. This package by default will execute all commands in /tmp, but it can be overridden by passing cwd.
import git
new_repo_path = '/tmp/my-new-repo'
os.mkdir(new_repo_path)
git.exec_command('init', cwd=new_repo_path)
Executing commands with separate environment:
By default every git command will be executed with the system environment, but it can be overridden by setting env.
import git
commit_env = os.environ
commit_env['GIT_AUTHOR_NAME'] = 'My Name'
commit_env['GIT_AUTHOR_EMAIL'] = 'me@email.com'
commit_env['GIT_COMMITTER_NAME'] = 'My Name'
commit_env['GIT_COMMITTER_EMAIL'] = 'me@email.com'
new_repo_path = '/tmp/my-new-repo'
git.exec_command('add', '.', cwd=new_repo_path)
git.exec_command('commit', '-m "first commit"', cwd=new_repo_path, env=commit_env)
Testing
$ python -m nose
Contributing
This repository is open to contributions.
Metadata
Release files for lambda-git 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lambda-git-0.1.1.tar.gz | 9.0 MB | Without provenance | Details for lambda-git-0.1.1.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lambda_git-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for lambda_git-0.1.1-py3-none-any.whl |
| lambda_git-0.1.1-py2-none-any.whl | Python 2 | none | any | Details for lambda_git-0.1.1-py2-none-any.whl |
Total release size: 26.9 MB
Release files / lambda-git-0.1.1.tar.gz
| Download URL | lambda-git-0.1.1.tar.gz |
|---|---|
| Size | 9.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
38f0fe772bffaccac0f02672936c49bdf155fd51c3ee0dc6d3582a1461e731e0
|
|
BLAKE2b-256 checksum How to use checksums |
43ab6e4b93b7096e3b1fb426aa7f453e91dc4ee27dad16b2c3dcc11486d1d47f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.1
|
Release files / lambda_git-0.1.1-py3-none-any.whl
| Download URL | lambda_git-0.1.1-py3-none-any.whl |
|---|---|
| Size | 9.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d8a63946fa0471628b4bb50dde098aa0cf317e0589bed785a63d783ec189a422
|
|
BLAKE2b-256 checksum How to use checksums |
6aa5190d059528bde81546248bcbd5d96fd294e32cc282f10889ad73e3d18a2d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.1
|
Release files / lambda_git-0.1.1-py2-none-any.whl
| Download URL | lambda_git-0.1.1-py2-none-any.whl |
|---|---|
| Size | 9.0 MB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
d5bfddae3a248238294f4b805949aa3f9ce0f66cf8bef94b819c29a05e29cf53
|
|
BLAKE2b-256 checksum How to use checksums |
6b0bb4e177dd646bd1653a64f6b5e4facf3ea1b8ad00d7fa29fad57c559a9dfa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.1
|
Security for lambda-git 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.