6 files were added to this release more than 14 days after its initial publication. Inspect the release files before installing.
pyaxon is an MIT Licensed python library for AXON. AXON is eXtended Object Notation. It’s a simple text based format for interchanging objects, documents and data. It tries to combine the best of JSON, XML and YAML.
links
Installation
pyaxon runs under Python 2.7/3.3/3.4.
It can be installed via pip:
pip install pyaxon
It can be installed from sources:
python setup.py install
Quick start
First import axon module:
>>> import axon
Load and dump lists, dicts, tuples:
>>> from decimal import Decimal
>>> from datetime import datetime, time, date
>>> text = axon.dumps([['abc абв', 1, 3.14, True],
[datetime.now(), Decimal('3.14')]])
>>> print(text)
["abc абв" 1 3.14 true]
[2015-05-12T13:08:37.078189 3.14D]
>>> vals = [{'id':1, 'nickname':'nick', 'time':time(12, 31, 34), 'text':'hello!'},
{'id':2, 'nickname':'mark', 'time':time(12, 32, 3), 'text':'hi!'}]
>>> text = axon.dumps(vals)
>>> print(text)
{id:1 nickname:"nick" text:"hello!" time:12:31:34}
{id:2 nickname:"mark" text:"hi!" time:12:32:03}
>>> text = axon.dumps(vals, pretty=1)
>>> print(text)
{ id: 1
nickname: "nick"
text: "hello!"
time: 12:31:34}
{ id: 2
nickname: "mark"
text: "hi!"
time: 12:32:03}
>>> vals == axon.loads(text)
True
>>> vals = [[{'a':1, 'b':2, 'c':3}, {'a':[1,2,3], 'b':(1,2,3), 'c':[]}]]
>>> text = axon.dumps(vals)
>>> print(text)
[{a:1 b:2 c:3} {a:[1 2 3] b:(1 2 3) c:[]}]
>>> text = axon.dumps(vals, pretty=1)
>>> print(text)
[ { a: 1
b: 2
c: 3}
{ a: [1 2 3]
b: (1 2 3)
c: []}]
>>> vals == axon.loads(text)
True
Dump, load objects in “safe” mode:
>>> vals = axon.loads('person{name:"nick" age:32 email:"nail@example.com"}')
>>> print(type(vals[0]))
<class 'axon._objects.Node'>
>>> print(vals[0])
node('person', {'email': 'nail@example.com', 'age': 32, 'name': 'nick'})
>>> text = axon.dumps(vals)
>>> print(text)
person{age:32 email:"nail@example.com" name:"nick"}
>>> text = axon.dumps(vals, pretty=1)
>>> print(text)
person
age: 32
email: "nail@example.com"
name: "nick"
>>> text = axon.dumps(vals, pretty=1, braces=1)
>>> print(text)
person {
age: 32
email: "nail@example.com"
name: "nick"}
Dump, load objects in unsafe mode:
class Person:
def __init__(self, name, age, email):
self.name = name
self.age = age
self.email = email
def __str__(self):
return "Person(name=%r, age=%r, email=%r)" % (self.name, self.age, self.email)
@axon.reduce(Person)
def reduce_Person(p):
return axon.node('person', {'name':p.name, 'age':p.age, 'email': p.email})
@axon.factory('person')
def factory_Person(attrs, vals):
return Person(name=attrs['name'], age=attrs['age'], email=attrs['email'])
>>> p = Person('nick', 32, 'mail@example.com')
>>> text = axon.dumps([p])
>>> print(text)
person{age:32 email:"mail@example.com" name:"nick"}
>>> val = axon.loads(text, mode='strict')[0]
>>> print(val)
Person(name='nick', age=32, email='mail@example.com')
>>> print(val.name==p.name, val.age==p.age, val.email==p.email)
True True True
Features
Provide simple API for loading and dumping of objects in textual AXON format.
Provide safe loading and dumping by default.
Provide unsafe loading and dumping of objects on the base of registration of factory/reduce callables.
Provide a way for fully controlled by application/framework/library unsafe loading and dumping.
It’s sufficiently fast so as to be useful.
Release files for pyaxon 0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Files added late
6 files were uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release files before installing.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyaxon-0.8.tar.gz | 411.7 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| pyaxon-0.8-cp34-none-win_amd64.whl | CPython 3.4 | none | Windows x86-64 | Details |
| pyaxon-0.8-cp34-none-win32.whl | CPython 3.4 | none | Windows x86-32 | Details |
| pyaxon-0.8-cp34-cp34m-macosx_10_6_intel.whl | CPython 3.4 | CPython 3.4 pymalloc | macOS 10.6+ Intel (x86-64, i386) | Details |
| pyaxon-0.8-cp33-none-win_amd64.whl | CPython 3.3 | none | Windows x86-64 | Details |
| pyaxon-0.8-cp33-none-win32.whl | CPython 3.3 | none | Windows x86-32 | Details |
| pyaxon-0.8-cp33-cp33m-macosx_10_6_intel.whl | CPython 3.3 | CPython 3.3 pymalloc | macOS 10.6+ Intel (x86-64, i386) | Details |
| pyaxon-0.8-cp27-none-win_amd64.whl | CPython 2.7 | none | Windows x86-64 | Details |
| pyaxon-0.8-cp27-none-win32.whl | CPython 2.7 | none | Windows x86-32 | Details |
| pyaxon-0.8-cp27-none-macosx_10_6_intel.whl | CPython 2.7 | none | macOS 10.6+ Intel (x86-64, i386) | Details |
Total release size: 4.1 MB
Release files / pyaxon-0.8.tar.gz
| Download URL | pyaxon-0.8.tar.gz |
|---|---|
| Size | 411.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eb0d8331bd0045b7208d055f993edc5d0cd6a9020b9eb88a5225a118ab7a9489
|
|
BLAKE2b-256 checksum How to use checksums |
4422c8ed851e14c151058389242085e9d6c174b584b5f6b99ffc99dc35ff33b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / pyaxon-0.8-cp34-none-win_amd64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | pyaxon-0.8-cp34-none-win_amd64.whl |
|---|---|
| Size | 299.4 kB |
| Tags | CPython 3.4 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
1abdd14321807d0158fdf30e8b69b554f13298b78bd271423e94169f89f3e9d8
|
|
BLAKE2b-256 checksum How to use checksums |
2ba9d7e8666a25e9da237f0497531d3e372997783c25d0d71c0a13595e760745
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / pyaxon-0.8-cp34-none-win32.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | pyaxon-0.8-cp34-none-win32.whl |
|---|---|
| Size | 271.4 kB |
| Tags | CPython 3.4 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
fe54175fa67743e28e43174bba208ca27b38e496f43fb75118e70941af0cd67d
|
|
BLAKE2b-256 checksum How to use checksums |
34f656501f33eb8895abb0334ffb8e957d7774a44ffe8f774b387aae8468d773
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / pyaxon-0.8-cp34-cp34m-macosx_10_6_intel.whl
| Download URL | pyaxon-0.8-cp34-cp34m-macosx_10_6_intel.whl |
|---|---|
| Size | 654.9 kB |
| Tags | CPython 3.4 CPython 3.4 pymalloc macOS 10.6+ Intel (x86-64, i386) |
|
SHA-256 checksum How to use checksums |
09b3535f0b17d0d29256e73565bf7978804e061b596352b6a0ab473a02094282
|
|
BLAKE2b-256 checksum How to use checksums |
286c07fabc80c91c8bcd55606660add6777942d44f873b21f0e83cc93cdcf69c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / pyaxon-0.8-cp33-none-win_amd64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | pyaxon-0.8-cp33-none-win_amd64.whl |
|---|---|
| Size | 299.3 kB |
| Tags | CPython 3.3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
d17beee3f0f4ea4d3d9ef20f4f6d34fa62d8a59d08470d2eaae7d5e97617ea6a
|
|
BLAKE2b-256 checksum How to use checksums |
c89e8feab5fcbf4aaa80ea24a21618d29abfd5c869a9a355ce047372b2ede4d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / pyaxon-0.8-cp33-none-win32.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | pyaxon-0.8-cp33-none-win32.whl |
|---|---|
| Size | 271.3 kB |
| Tags | CPython 3.3 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
2ee43e2ac6865fe3eb2a6c66579a848bfebd4441841d159548e199057d162d99
|
|
BLAKE2b-256 checksum How to use checksums |
10c591928325a3401d61a8f2ab379c3183f14034f50464a229267818d40dd995
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / pyaxon-0.8-cp33-cp33m-macosx_10_6_intel.whl
| Download URL | pyaxon-0.8-cp33-cp33m-macosx_10_6_intel.whl |
|---|---|
| Size | 654.6 kB |
| Tags | CPython 3.3 CPython 3.3 pymalloc macOS 10.6+ Intel (x86-64, i386) |
|
SHA-256 checksum How to use checksums |
15119878f3f13f9130c7344c5898b36662a30c592fa897cf24ab26db2fd11882
|
|
BLAKE2b-256 checksum How to use checksums |
5e971c4636bcb3d98d8fec009b31ed64c85f8ccc7b853e6810c11db86e219bb7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / pyaxon-0.8-cp27-none-win_amd64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | pyaxon-0.8-cp27-none-win_amd64.whl |
|---|---|
| Size | 298.9 kB |
| Tags | CPython 2.7 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
9081c034f963bc40c0e1372647e6c2ccd7c06ae793b4bd0aba8a665b6523fde1
|
|
BLAKE2b-256 checksum How to use checksums |
9952b1107ebce62a9bfa97e0d69f8055e7abbeb2502e1626bf02cf2f1d036b96
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / pyaxon-0.8-cp27-none-win32.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | pyaxon-0.8-cp27-none-win32.whl |
|---|---|
| Size | 267.1 kB |
| Tags | CPython 2.7 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
62812dc639917bb192a863edb318419bbb43617c0d4df790c87c06995596cd2d
|
|
BLAKE2b-256 checksum How to use checksums |
952bdb13c1753515526d6c1810e063f6c8196e08e307449b868dff67612e84ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / pyaxon-0.8-cp27-none-macosx_10_6_intel.whl
| Download URL | pyaxon-0.8-cp27-none-macosx_10_6_intel.whl |
|---|---|
| Size | 641.0 kB |
| Tags | CPython 2.7 macOS 10.6+ Intel (x86-64, i386) |
|
SHA-256 checksum How to use checksums |
7c3f23ba359474a8a3c24ed72e0fd85a870264345ac8b59488622e24b9d96f37
|
|
BLAKE2b-256 checksum How to use checksums |
8b7716389a300e9febcb9d1af33c2b4fce415bad6bb55614523bb58f6b606c84
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |