diff --git a/.gitignore b/.gitignore index c906af6..dbe67c4 100644 --- a/.gitignore +++ b/.gitignore @@ -168,3 +168,6 @@ cython_debug/ !doc_gen/Makefile !doc_gen/static.css doc_gen/* + +# Examples +!samples/* diff --git a/README.md b/README.md index c4edd74..1830c8d 100644 --- a/README.md +++ b/README.md @@ -51,31 +51,16 @@ git2s3 start
Sourcing environment variables from an env file -Environment variables can be sourced using any `plaintext` / `JSON` / `YAML` file. -The filepath should be provided as an argument during object instantiation. - -> _By default, `Git2S3` will look for a `.env` file in the current working directory._ - -**Examples** - -- **CLI** -```shell -git2s3 start --env-file "/path/to/env/file" -``` - -- **IDE** -```python -import git2s3 -backup = git2s3.Git2S3(env_file='/path/to/env/file') -backup.start() -``` +> _By default, `Git2S3` will look for a `.env` file in the current working directory._
+> Refer [samples] directory for examples.
- **GIT_API_URL** - GitHub API endpoint. Defaults to `https://api.github.com/` - **GIT_OWNER** - GitHub profile owner or organization name. - **GIT_TOKEN** - GitHub token to get ALL repos (including private). -- **FIELDS** - Fields options to restore. Defaults to all. +- **GIT_IGNORE** - List of repositories/gists to ignore. Defaults to `[]` +- **SOURCE** - Source options `[repo, gist, wiki]` to back up. Defaults to all. - **LOG** - Log options to log to a ``file`` or ``stdout``. _Does not apply when custom logger is used_ - **DEBUG** - Boolean flag to enable debug level logging. _Does not apply when custom logger is used_ - **AWS_PROFILE_NAME** - AWS profile name. Uses the CLI config value ``AWS_DEFAULT_PROFILE`` by default. @@ -162,3 +147,4 @@ Licensed under the [MIT License][license] [license]: https://github.com/thevickypedia/git2s3/blob/master/LICENSE [runbook]: https://thevickypedia.github.io/git2s3/ [Boto3 retry configuration]: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/retries.html#available-retry-modes +[samples]: https://github.com/thevickypedia/git2s3/tree/main/samples diff --git a/doc_gen/index.rst b/doc_gen/index.rst index c56085c..8ecf322 100644 --- a/doc_gen/index.rst +++ b/doc_gen/index.rst @@ -14,6 +14,7 @@ Welcome to Git2S3's documentation! Git2S3 - Main ============= + .. automodule:: git2s3.main S3 @@ -22,19 +23,18 @@ S3 Squire ====== + .. automodule:: git2s3.squire Configuration ============= -.. autoclass:: git2s3.config.Field(BaseModel) - :members: EnvConfig - :exclude-members: _abc_impl, model_config, model_fields +.. autoclass:: git2s3.config.DataStore(BaseModel) + :exclude-members: _abc_impl, model_config, model_fields, model_computed_fields ==== .. autoclass:: git2s3.config.EnvConfig(BaseSettings) - :members: EnvConfig :exclude-members: _abc_impl, model_config, model_fields, model_computed_fields ==== @@ -43,7 +43,12 @@ Configuration ==== -.. autoclass:: git2s3.config.Fields(StrEnum) +.. autoclass:: git2s3.config.SourceControl(StrEnum) + +Exceptions +========== + +.. automodule:: git2s3.exc Indices and tables ================== diff --git a/docs/README.html b/docs/README.html index 5024cce..eb7f5cc 100644 --- a/docs/README.html +++ b/docs/README.html @@ -87,31 +87,16 @@

Kick off

Environment Variables

-Sourcing environment variables from an env file

Environment variables can be sourced using any plaintext / JSON / YAML file. -The filepath should be provided as an argument during object instantiation.

-
-

By default, Git2S3 will look for a .env file in the current working directory.

+Sourcing environment variables from an env file
+

By default, Git2S3 will look for a .env file in the current working directory.
+Refer samples directory for examples.

-

Examples

-
    -
  • CLI

  • -
-
git2s3 start --env-file "/path/to/env/file"
-
-
-
    -
  • IDE

  • -
-
import git2s3
-backup = git2s3.Git2S3(env_file='/path/to/env/file')
-backup.start()
-
-