MetaData Sharing
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

25 lines
704 B

  1. import pasn1
  2. import cli
  3. import datetime
  4. persona = cli.Persona()
  5. persona.generate_key()
  6. cbr = persona.get_identity().uuid
  7. objst = cli.ObjectStore(cbr)
  8. map(objst.loadobj,
  9. [
  10. {
  11. 'type': 'metadata',
  12. 'uuid': '3e466e06-45de-4ecc-84ba-2d2a3d970e96',
  13. 'created_by_ref': cbr,
  14. 'modified': datetime.datetime(2019, 5, 31, 14, 5, 3),
  15. 'dc:creator': [ u'John-Mark Gurney' ],
  16. 'hashes': [ 'sha256:91751cee0a1ab8414400238a761411daa29643ab4b8243e9a91649e25be53ada', 'sha512:7d5768d47b6bc27dc4fa7e9732cfa2de506ca262a2749cb108923e5dddffde842bbfee6cb8d692fb43aca0f12946c521cce2633887914ca1f96898478d10ad3f' ],
  17. 'lang': 'en'
  18. }
  19. ]
  20. )
  21. objst.store('sample.data.pasn1')
  22. persona.store('sample.persona.pasn1')