grizzly_io 2.2.0

  • Readme
  • Changelog
  • Installing
  • 61

Grizzly IO #

Readers and writers for several file formats (CSV, TSV, JSON, YAML, etc)

Usage #

Labeled TSV #

Read from file system #

main() async {
      final tsv = await readLTsv('data/example.tsv');
      print(tsv);
}

Read from HTTP #

main() async {
      final tsv = await requestLTsv('http://localhost:8000/example.tsv');
      print(tsv);
}

Read with custom separators #

main() async {
      final tsv = await readCsv('data/example.csv', fieldSep: '|', textSep: "'");
      print(tsv);
}

Write #

main() async {
      final csv = await readCsv('data/example.csv');
      String encoded = encodeCsv(csv);
}

example.tsv:

Name	Age	House
Jon	25	Stark
Dany	28	Targaryan
Tyrion	40	Lannister
Elia Martell	75	Martell

example.csv:

Name,Age,House
Jon,25,Stark
Dany,28,Targaryan
Tyrion,40,Lannister
Elia Martell,75,Martell

TODO #

  • [ ] Read JSON
  • [ ] Write JSON
  • [ ] Read yaml
  • [ ] Write yaml
  • [ ] Read mongo
  • [ ] Write mongo
  • [ ] Handle zip files

Changelog #

2.2.0 #

  • Combined Rows and Columns into Table

2.1.0 #

  • Renamed LabledTable to Table

2.0.1 #

  • Analyzer warning fixes

2.0.0 #

  • Dart 2.0.0 support

1.2.2 #

  • Bug fix: TypeConverter.toNum

1.2.1 #

  • Breaking changes to LabeledTsv

0.0.4 #

  • Replaced LabeledTsv with parseLabTsv and toLabTsv
  • Added LabeledTable and Table to fluently morph columns in a table

0.0.3 #

  • Browser and dart:io based loaders to read file formats from different sources

0.0.2 #

  • TypeConverter to convert type of columns in List or Map table

0.0.1 #

  • CsvParser to parse CSV-like files
  • LabeledTsv to read/write labeled TSV files

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  grizzly_io: ^2.2.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:grizzly_io/grizzly_io.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
23
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
61
Learn more about scoring.

We analyzed this package on Nov 7, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.0
  • pana: 0.12.21

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:grizzly_io/grizzly_io.dart.

Health suggestions

Fix lib/src/type_converter/table.dart. (-0.50 points)

Analysis of lib/src/type_converter/table.dart reported 1 hint:

line 148 col 7: DO use curly braces for all flow control structures.

Maintenance suggestions

Maintain an example.

None of the files in the package's example/ directory matches known example patterns.

Common filename patterns include main.dart, example.dart, and grizzly_io.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
http ^0.12.0 0.12.0+2
intl ^0.16.0 0.16.0
Transitive dependencies
async 2.4.0
charcode 1.1.2
collection 1.14.12
http_parser 3.1.3
meta 1.1.8
path 1.6.4
pedantic 1.8.0+1
source_span 1.5.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
Dev dependencies
test any