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.
 
 
 
 

26 lines
732 B

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