Skip to content

Commit

Permalink
chore: release ready, added mandatory non source-code files
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhi591 committed Jun 20, 2024
1 parent 4fd685c commit f5d2c5c
Show file tree
Hide file tree
Showing 7 changed files with 574 additions and 0 deletions.
91 changes: 91 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Changelog
All 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).

## [1.0.0] - 2024-06-20
### Added
- First release of VWO Feature Management and Experimentation capabilities
```python
from vwo import init

options = {
'sdk_key': '32-alpha-numeric-sdk-key', # SDK Key
'account_id': '123456' # VWO Account ID
}

vwo_client = init(options)

# set user context
user_context = {'id': 'unique_user_id'}
# returns a flag object
get_flag = vwo_client.get_flag('feature_key', user_context)
# check if flag is enabled
is_enabled = get_flag.is_enabled()
# get varible
int_var = get_flag.get_variable('int_variable_key', 'default_value')

# track event
vwo_client.track_event('event_name', user_context, event_properties)

# set attribute
vwo_client.set_attribute('attribute_key', 'attribute_value', user_context)
```

- **Storage**

```python
from vwo.packages.storage.connector import StorageConnector
class UserStorage(StorageConnector):
def get(self, key: str, user_id: str):
return client_db.get(f"{key}_{user_id}")

def set(self, value: dict):
key = f"{value.get('featureKey')}_{value.get('user')}"
client_db[key] = {
'rolloutKey': value.get('rolloutKey'),
'rolloutVariationId': value.get('rolloutVariationId'),
'rolloutId': value.get('rolloutId'),
'experimentKey': value.get('experimentKey'),
'experimentVariationId': value.get('experimentVariationId'),
'experimentId': value.get('experimentId'),
}
return True

options = {
'sdk_key': '32-alpha-numeric-sdk-key', # SDK Key
'account_id': '123456', # VWO Account ID
'storage': UserStorage()
}

vwo_client = init(options)
```

- **Log messages**

```python
options = {
'sdk_key': '32-alpha-numeric-sdk-key', # SDK Key
'account_id': '123456', # VWO Account ID
'logger': {
'level': 'DEBUG',
'prefix': 'VWO-FME-PYTHON-SDK'
}
}

vwo_client = init(options)
```

- **Polling support**

```python
options = {
'sdk_key': '32-alpha-numeric-sdk-key', # SDK Key
'account_id': '123456', # VWO Account ID
'poll_interval': 5000 # in milliseconds
}

vwo_client = init(options)
```

76 changes: 76 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at dev@wingify.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
42 changes: 42 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
## Contributing to VWO Feature Management and Experimentation SDK for Python

We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:

- Reporting a bug
- Discussing the current state of the code
- Submitting a fix
- Proposing new features

### We Use [Github Flow](https://guides.github.com/introduction/flow/index.html), So All Code Changes Happen Through Pull Requests

Pull requests are the best way to propose changes to the codebase (we use [Github Flow](https://guides.github.com/introduction/flow/index.html)). We actively welcome your pull requests:

1. Fork the repo and create your branch from `master`.
2. If you've added code that should be tested, add tests.
3. Ensure the test suite passes.
4. Make sure your code lints.
5. Open a pull request!

### Any contributions you make will be under the Apache 2.0 Software License

When you submit code changes, your submissions are understood to be under the same [Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0) that covers the project. Feel free to contact the maintainers if that's a concern.

### Report bugs using GitHub issues

We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/wingify/vwo-fme-python-sdk/issues); it's that easy!

**Note**: Write bug reports with detail, background, and sample code

**Great Bug Reports** tend to have:

- A quick summary and/or background
- Steps to reproduce
- Be specific!
- Give sample code if you can.
- What you expected would happen
- What actually happens
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)

### License

By contributing, you agree that your contributions will be licensed under its Apache 2.0 License.
Loading

0 comments on commit f5d2c5c

Please sign in to comment.