-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
208 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,6 +52,7 @@ Contributing quickstart | |
Assuming Git, Vagrant_ and VirtualBox_ are installed: | ||
|
||
:: | ||
|
||
host$ git clone [email protected]:snowplow/snowplow-python-tracker.git | ||
host$ vagrant up && vagrant ssh | ||
guest$ cd /vagrant | ||
|
@@ -64,6 +65,7 @@ Publishing | |
########## | ||
|
||
:: | ||
|
||
host$ vagrant push | ||
|
||
Copyright and license | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ requests==2.2.1 | |
celery==3.1.11 | ||
gevent==1.0.0 | ||
redis==2.9.1 | ||
six==1.9.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
from snowplow_tracker._version import __version__ | ||
from snowplow_tracker.subject import Subject | ||
from snowplow_tracker.emitters import logger, Emitter, AsyncEmitter, CeleryEmitter, RedisEmitter | ||
from snowplow_tracker.self_describing_json import SelfDescribingJson | ||
from snowplow_tracker.tracker import Tracker | ||
from contracts import disable_all as disable_contracts, enable_all as enable_contracts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
""" | ||
self_describing_json.py | ||
Copyright (c) 2013-2014 Snowplow Analytics Ltd. All rights reserved. | ||
This program is licensed to you under the Apache License Version 2.0, | ||
and you may not use this file except in compliance with the Apache License | ||
Version 2.0. You may obtain a copy of the Apache License Version 2.0 at | ||
http://www.apache.org/licenses/LICENSE-2.0. | ||
Unless required by applicable law or agreed to in writing, | ||
software distributed under the Apache License Version 2.0 is distributed on | ||
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
express or implied. See the Apache License Version 2.0 for the specific | ||
language governing permissions and limitations there under. | ||
Authors: Anuj More, Alex Dean, Fred Blundun | ||
Copyright: Copyright (c) 2013-2014 Snowplow Analytics Ltd | ||
License: Apache License Version 2.0 | ||
""" | ||
|
||
class SelfDescribingJson(object): | ||
|
||
def __init__(self, schema, data): | ||
self.schema = schema | ||
self.data = data | ||
|
||
def to_json(self): | ||
return { | ||
"schema": self.schema, | ||
"data": self.data | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.