Skip to content

s3git/s3git-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

s3git-py

Join the chat at https://gitter.im/s3git/s3git

This is a Python module for s3git. Please see here for a general introduction to s3git including its use cases.

This module is based on the s3git-go package that is invoked via foreign function interface (FFI).

DISCLAIMER: This software is still under development (although the storage format/model is stable) -- use at your own peril for now

Note that the API is not stable yet, you can expect minor changes/extensions

Installation

Please make sure you have a working Golang environment installed, otherwise you cannot build the shared library. See install golang for setting up a working Golang environment.

Also the s3git-go package needs to be available locally (go get -d github.com/s3git/s3git-go).

$ 

Examples

Here are some common examples of typical tasks

Create a repository

$ python3
>>> import s3git
>>> repo = s3git.init_repository('.')
>>> repo.add('s3git.py')
>>> repo.commit('My first s3git commit from Python')
>>> exit()
$ s3git log --pretty
113b9e900588fd830deed131c0f2f2cdd88b4751286ecc4967d0d4990aff6821c2426425955ec104797b142e93204a604e4ba420b3b617724237476128333de8 My first s3git commit from Python
$ s3git ls
c518dc5f1d95258dc91f6d285e7ea7300f37dea4dd517173f2e23afe0cb52bc9d8eb18683cdcf377e96a2d5a81585e61f6d27fa5d017cad53836bd050e9f105f
$ s3git cat c518dc5f1d95258dc91f6d285e7ea7300f37dea4dd517173f2e23afe0cb52bc9d8eb18683cdcf377e96a2d5a81585e61f6d27fa5d017cad53836bd050e9f105f
hello s3git

Clone a repository

>>> import s3git
>>> repo = s3git.clone('s3://s3git-spoon-knife', '.', access='AKIAJYNT4FCBFWDQPERQ', secret='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')
>>> repo.list('')

Limitations and Optimizations

  • To be described

Contributions

Contributions are welcome, please submit a pull request for any enhancements.

License

s3git-rb is released under the Apache License v2.0. You can find the complete text in the file LICENSE.

About

Python module for s3git: git for Cloud Storage

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published