Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
common_helper_encoder
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fact-depend
common_helper_encoder
Commits
548866d4
Commit
548866d4
authored
Apr 15, 2016
by
Timm Behner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial commit
parents
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
0 deletions
+21
-0
__init__.py
common_helper_encoder/__init__.py
+5
-0
json_decoder.py
common_helper_encoder/json_decoder.py
+7
-0
setup.py
setup.py
+9
-0
No files found.
common_helper_encoder/__init__.py
0 → 100644
View file @
548866d4
from
.json_decoder
import
DatetimeEncoder
__all__
=
[
'DatetimeEncoder'
,
]
common_helper_encoder/json_decoder.py
0 → 100644
View file @
548866d4
import
json
class
DatetimeEncoder
(
json
.
JSONEncoder
):
def
default
(
self
,
obj
):
if
isinstance
(
value
,
datetime
.
datetime
):
return
value
.
isoformat
()
return
json
.
JSONEncoder
.
default
(
self
,
obj
)
setup.py
0 → 100644
View file @
548866d4
import
os
import
subprocess
from
setuptools
import
setup
,
find_packages
setup
(
name
=
"common_helper_encoder"
,
version
=
subprocess
.
check_output
([
'git'
,
'describe'
,
'--always'
],
cwd
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)))
.
strip
()
.
decode
(
'utf-8'
),
packages
=
find_packages
(),
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment